2007 Jan 26 1:13 PM
Hello!
I have got the following situation concerning my S m a r t f o r m:
The "Program lines" at the node HEADER there is existing below
shown code. The TEXT has the follwing entry:
*Text
Loading Point: &G_ABLD& Storage Depot: &G_HALLE& Gate: &G_TOR&
*Program lines
SELECT * FROM /DCA/P000_BWPOS
INTO table LS_BWPOS_it
WHERE KEYTYP EQ '/G2A/KEY_CU_ABL_PARTNER'.
LOOP AT LS_BWPOS_it INTO LS_BWPOS.
g_bw_data = LS_BWPOS.
g_vstl = g_bw_data+33(4).
if LC_VA_WERKS EQ g_vstl.
g_abld = g_bw_data+37(3).
g_halle = g_bw_data+143(1).
g_tor = g_bw_data+144(3).
endif.
ENDLOOP.
The problem is I do get only one output instead of
many outputs. There are 4 entries in the table existing
which has been given out. What is wrong in that case.
All other variables which are mentioned here
they are declared global. Is it necessary to write
additional Loop in the TEXT section ?
Regards
Ilhan
2007 Jan 26 1:20 PM
Hi Ertas,
YOu need to embed the text element inside a LOOP Element.
Right Click on the Main Window
Create->Flow Logic->Loop.
Then Cut the text and paste under the loop node.
IN the loop element, use the LS_BWPOS_it table and work area LS_BWPOS, which should be already declared in the global definition section.
The program lines can now omit the loop statement.
Regards,
Ravi
Hello!
I have got the following situation concerning my S m a r t f o r m:
The "Program lines" at the node HEADER there is existing below
shown code. The TEXT has the follwing entry:
*Text
Loading Point: &G_ABLD& Storage Depot: &G_HALLE& Gate: &G_TOR&
*Program lines
SELECT * FROM /DCA/P000_BWPOS
INTO table LS_BWPOS_it
WHERE KEYTYP EQ '/G2A/KEY_CU_ABL_PARTNER'.
LOOP AT LS_BWPOS_it INTO LS_BWPOS.
g_bw_data = LS_BWPOS.
g_vstl = g_bw_data+33(4).
if LC_VA_WERKS EQ g_vstl.
g_abld = g_bw_data+37(3).
g_halle = g_bw_data+143(1).
g_tor = g_bw_data+144(3).
endif.
ENDLOOP.
The problem is I do get only one output instead of
many outputs. There are 4 entries in the table existing
which has been given out. What is wrong in that case.
All other variables which are mentioned here
they are declared global. Is it necessary to write
additional Loop in the TEXT section ?
Regards
Ilhan
2007 Jan 26 1:20 PM
Hi Ertas,
YOu need to embed the text element inside a LOOP Element.
Right Click on the Main Window
Create->Flow Logic->Loop.
Then Cut the text and paste under the loop node.
IN the loop element, use the LS_BWPOS_it table and work area LS_BWPOS, which should be already declared in the global definition section.
The program lines can now omit the loop statement.
Regards,
Ravi
2007 Jan 26 1:24 PM
Hi
Yes! you should load the data in internal table and use LOOP node to write the data:
So your smart should be:
Node -> LOOP (for LS_BWPOS_IT)
Node -> Abap code to format the data to be peinted)
Node -> Text to write the data
Max
2007 Jan 26 1:33 PM
sorry how do you mean it ?
Node -> LOOP (for LS_BWPOS_IT)
Node -> Abap code to format the data to be peinted)
Node -> Text to write the data
or
Node -> LOOP (for LS_BWPOS_IT)
Node -> Abap code to format the data to be peinted)
Node -> Text to write the data
or
Node -> Abap code to format the data to be peinted)
Node -> LOOP (for LS_BWPOS_IT)
Node -> Text to write the data
Regards
Ilhan
2007 Jan 26 1:50 PM
I'm sorry but with tis logic it doesn' t work. This affected area
is empty now something else overwrites this section
YOu need to embed the text element inside a LOOP Element.
Right Click on the Main Window
Create->Flow Logic->Loop.
Then Cut the text and paste under the loop node.
IN the loop element, use the LS_BWPOS_it table and work area LS_BWPOS, which should be already declared in the global definition section.
The program lines can now omit the loop statement.
Regards,
Ravi
Node -> LOOP (for LS_BWPOS_IT)
Node -> Abap code to format the data to be peinted)
Node -> Text to write the data
2007 Jan 26 2:03 PM
Hi
I believe your code is right but now it has to be transfer in a LOOP:
So you need:
A) to create a COMMAND LINE to load the interna table
Text
Loading Point: &G_ABLD& Storage Depot: &G_HALLE& Gate: &G_TOR&
*Program lines
SELECT * FROM /DCA/P000_BWPOS
INTO table LS_BWPOS_it
WHERE KEYTYP EQ '/G2A/KEY_CU_ABL_PARTNER'.
B) (Node -> LOOP (for LS_BWPOS_IT) to create a LOOP node:
- by the right button of the mouse-> Create->Flow Logic->Loop
LOOP AT LS_BWPOS_it INTO LS_BWPOS.
C) (Node -> Abap code to format the data to be peinted) Into the LOOP create PROAGRAM LINES node:
- by the right button of the mouse-> Create->Flow Logic->Command Lines
_bw_data = LS_BWPOS.
g_vstl = g_bw_data+33(4).
if LC_VA_WERKS EQ g_vstl.
g_abld = g_bw_data+37(3).
g_halle = g_bw_data+143(1).
g_tor = g_bw_data+144(3).
endif.D) (Node -> Text to write the data) Into the LOOP and after the COMMAND LINES insert a TEXT node.
Loading Point: &G_ABLD& Storage Depot: &G_HALLE& Gate: &G_TOR&
Max
2007 Jan 26 2:18 PM
Hi,
I have created a COMMAND LINE and what happens it dumps:
I have written the fieldname of my internaltable without any value.
What can I write in the field named value inside of COMMAND LINE ?
And why command line ???
2007 Jan 26 2:27 PM