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

Output from Internal Table - pls help

Former Member
0 Likes
763

Hi All,

In my infoset-query, i am trying to output the values from my internal table in different lines, but the values are getting overwritten & displayed in a single line only.

I have defined Y_MATNR, Y_WERKS, Y_EBELN... as nodes in the extra tab of the infoset.

Output i need is:

Y_MATNR Y_WERKS Y_EBELN Y_EBELP Y_EINDT Y_OPENQTY

ABC 1000 12345 0010 1.2.2008 2

BCF 1000 12345 0020 2.2.2008 3

XYZ 1000 13423 0010 10.2.2008 20

But at the moment i just see:

Y_MATNR Y_WERKS Y_EBELN Y_EBELP Y_EINDT Y_OPENQTY

XYZ 1000 13423 0010 10.2.2008 20

Code:

LOOP AT IL_PO.

READ TABLE IL_PO.

MOVE: IT_PO-YL_MATNR TO Y_MATNR,

IT_PO-YL_WERKS TO Y_WERKS,

IT_PO-YL_EBELN TO Y_EBELN,

IT_PO-YL_EBELP TO Y_EBELP,

IT_PO-YL_EINDT TO Y_EINDT,

IT_PO-YL_OPENQTY TO Y_OPENQTY.

ENDLOOP.

Can someone let me know why is it not displaying all 3 lines instead overwriting on the 1st line itself?

Anyone to help?

Edited by: Vivek on Jan 12, 2008 6:24 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
729

Hello,

I cannot see an output statement (e.g. write) in your code example. Therefore I think it's impossible for us to give you an answer to your question.

Best regards

Stephan

Hi All,

In my infoset-query, i am trying to output the values from my internal table in different lines, but the values are getting overwritten & displayed in a single line only.

I have defined Y_MATNR, Y_WERKS, Y_EBELN... as nodes in the extra tab of the infoset.

Output i need is:

Y_MATNR Y_WERKS Y_EBELN Y_EBELP Y_EINDT Y_OPENQTY

ABC 1000 12345 0010 1.2.2008 2

BCF 1000 12345 0020 2.2.2008 3

XYZ 1000 13423 0010 10.2.2008 20

But at the moment i just see:

Y_MATNR Y_WERKS Y_EBELN Y_EBELP Y_EINDT Y_OPENQTY

XYZ 1000 13423 0010 10.2.2008 20

Code:

LOOP AT IL_PO.

READ TABLE IL_PO.

MOVE: IT_PO-YL_MATNR TO Y_MATNR,

IT_PO-YL_WERKS TO Y_WERKS,

IT_PO-YL_EBELN TO Y_EBELN,

IT_PO-YL_EBELP TO Y_EBELP,

IT_PO-YL_EINDT TO Y_EINDT,

IT_PO-YL_OPENQTY TO Y_OPENQTY.

ENDLOOP.

Can someone let me know why is it not displaying all 3 lines instead overwriting on the 1st line itself?

Anyone to help?

Edited by: Vivek on Jan 12, 2008 6:24 PM

6 REPLIES 6
Read only

Former Member
0 Likes
730

Hello,

I cannot see an output statement (e.g. write) in your code example. Therefore I think it's impossible for us to give you an answer to your question.

Best regards

Stephan

Read only

Former Member
0 Likes
729

Hi Vivek,

Use New Line to output values on different lines.

Or else you can use WRITE : / to output values so that they will be outputted on different lines.

Regards,

Chandru

Read only

Former Member
0 Likes
729

Hi Vivek,

Use the write command followed by new-line command between loop and endloop .

Reward points if helpful..

Regards,

Goutham.

Read only

Former Member
0 Likes
729

HI,

CHECK THE CODE .

LOOP AT IL_PO.

READ TABLE IL_PO.

MOVE: IT_PO-YL_MATNR TO Y_MATNR,

IT_PO-YL_WERKS TO Y_WERKS,

IT_PO-YL_EBELN TO Y_EBELN,

IT_PO-YL_EBELP TO Y_EBELP,

IT_PO-YL_EINDT TO Y_EINDT,

IT_PO-YL_OPENQTY TO Y_OPENQTY.

******************************************

WRITE : / Y_WERKS,

Y_EBELN,

Y_EBELP,

Y_EINDT,

Y_OPENQTY.

******************************************

ENDLOOP.

REWARD POINTS IF USEFULL.

REGARDS,

SREE.....

Read only

Former Member
0 Likes
729

where's your 'write' sentence?

Read only

Former Member
0 Likes
729

Hi All,

Thanks for all your inputs. Keep the good work going.

Regards,

Vivek