cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in populating and internal table's data into a SAP-Script Form

Former Member
0 Kudos

Dear Guru

here i have encountered an issue in populating and internal table's data into a SAP-Script Form.

char1_val_tab_1 is an internal table and i am trying to populate its

char1_val_tab_1-atnam -->> characteristics names

char1_val_tab_1-atflv --->> characteristics value

into a sap-script form.

so in sapscript's from i have passed this two variable

like below

&char1_val_tab_1-atnam&

&char1_val_tab_1-atflv&

and in driver prog of that sap-script form i have written code like below in order to populate all the lines of these internal table char1_val_tab_1

LOOP at char1_val_tab_1.
   
   PERFORM write_form USING 'ITEM' ' ' ' ' 'MAIN'.


ENDLOOP.

But the issue i am facing this looping only printing the last line of that internal table but i want from 1st line to last line.

so guru i want to know what are the necessary changes i should make in to above looping in order to print 1st line to last line of that internal table char1_val_tab_1.

Pls help

Thanx & Regards

Saifur Rahaman

View Entire Topic
Former Member
0 Kudos

Hi,

I think you need to have a work area in your print program and then in text element use the workarea to display the fields.

All other code lines are fine but use the statement .

LOOP AT itab INTO workarea.

I believe it is printing the last line due to lack of the workarea.

Regards,

Ram

Former Member
0 Kudos

Hi Ramkrishna

That means my code should be like below ??

LOOP at char1_val_tab_1 into wa_char1_val_tab_1.

   PERFORM write_form USING 'ITEM' ' ' ' ' 'MAIN'.


ENDLOOP.

any neccessary coding i have to add apart from this inorder to populate all lines ??