Skip to Content
0

Item data is not coming properly with corrosponding header data in Smartforms

Nov 11, 2016 at 10:04 AM

107

avatar image

Hi Friends,

I am executing Smart form without driver program.

I am having two tables data in Main window, One for PO header and another for PO Item but problem is that, header data is coming properly but in item data only last record is coming, Suppose if you have 3 items records for one PO number but in output only last recording is showing...

see below screenshot

po-header2.jpg

po-header3.jpgpo-header4.jpgpo-header4.jpg

See in below screenshot how output is coming(only last record is coming item data)

img-20150615-141767.jpg

But in actual, having 3 records in internal table

img-20150615-141221.jpg

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sivaraj Sadasivam Nov 11, 2016 at 10:42 AM
0

Hi Sandeep Patel,

You have done one basic mistake,

Please rearrange hierarchy,

ROW13 Item details comes under LOOP

Not after loop.

Please do this,

Your output will come correctly,

Hope you understand what mistake you have done.

Here whats happen,

Its looping item table fully after its goes to Row13Itemdetails. So final value only workarea will have in it.

Solutions: Cut and Paste Row13Itemdetails under loop, Then it will loop one data and print again loop continue for remaining data and print in output.

Thanks,

Sivaraj Sadasivam.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Sivaraj,

You are right, I did one basic mistake and that I have corrected and my output is coming properly.

Thank you

sandeep

1
max bianchi Nov 11, 2016 at 10:55 AM
0

Hi

You smartforms is ok but as Sivaraj have written the row for item data (ROW13) is out of LOOP2, and perhaps it should be better to use INITIALIZATION tab (instead of abap node in a main) for uploading the data to be printed

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Thank you Max for your valuable suugestion.

From next time ,I will do coding in INITIALIZATION TAB.

Thank you

Sandeep

0

Next time, pass the data from application, don't read it in the form :)

0

Thank you Janis ,

Is there any advantage to pass the data from Application program ?

Thank you

Sandeep

0

Separation of concerns - if the data selection logic is separate, form can be easier replaced with other form, there can be several forms reusing same data etc.

1