Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

getting more outputs

Former Member
0 Likes
962

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
937

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

7 REPLIES 7
Read only

Former Member
0 Likes
938

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

Read only

Former Member
0 Likes
937

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

Read only

Former Member
0 Likes
937

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

Read only

Former Member
0 Likes
937

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

Read only

0 Likes
937

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

Read only

Former Member
0 Likes
937

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 ???

Read only

0 Likes
937

Which dump?

Yes of course

Max