cancel
Showing results for 
Search instead for 
Did you mean: 

passing internal table to a form

Former Member
0 Kudos

Hi

i wanted to pass an internal table into a form .the internal table is not having data dictionary structure . can any one help in this ?

Thanks in advance.

Regards,

devika.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Wants to pass ITAB to SMARTFORM or Scriptform?

If no structure is available in data dictionary youy create a ZSTRUCTURE in SE11 and use that structure field and pass the ITAB to smartform.

<b>Reward points for useful Answers</b>

Regards

Anji

Answers (3)

Answers (3)

Former Member
0 Kudos

I am not sure about your question,if it is smartform then you got answer..

if it is perform and form then use below method.

PERFORM write_2_server TABLES hire_emp_tab.

PERFORM write_2_server TABLES entrance_tab.

PERFORM write_2_server TABLES integration_tab.

PERFORM write_2_server TABLES duty_tab .

PERFORM write_2_server TABLES type_emp_tab.

PERFORM write_2_server TABLES job_part_tab .

PERFORM write_2_server TABLES free_days_tab.

PERFORM write_2_server TABLES status_tab.

PERFORM write_2_server TABLES bank_detailes_tab.

FORM write_2_server TABLES p_tab_data.

FIELD-SYMBOLS: <wa> TYPE ANY.

" MOVE 'D:_pa_test_mmsk_pa1.txt' TO adress.

OPEN DATASET adress IN TEXT MODE

ENCODING DEFAULT FOR OUTPUT.

IF sy-subrc = 0.

no_file = ' '.

LOOP AT p_tab_data ASSIGNING <wa>.

TRANSFER <wa> TO adress.

ENDLOOP.

CLOSE DATASET adress.

ELSE.

no_file = 'X'.

ENDIF.

endform.

Thanks

Seshu

Former Member
0 Kudos

Dear Devika,

Declare the Structure through the Types declaration

like as given below

<i>types: begin of ztest1,

id type n,

name(12).

types: end of ztest1.

</i>

declare internal table through types in Types tab once again as given below.

<i>types: ztest type table of ztest1.</i>

Then declare the internal table in Global Declarations through something called TYPE from the Types declaration structure you have just now done in Types Tab.

<b>ZTAB</b> TYPE ZTEST - this one is internal table w/o

SE11 structure

<b>ZWA</b> TYPE ZTEST1

Similarly Declare a Work Area of the same Type structure as you have defined.

Then in Data tab of the Table give the Internal table(ZTAB) name and the Work Area name(ZWA).

Hope this helps you out

Thanks

Venugopal

Reward if it helps

Message was edited by: Venugopal

Venugopal T

Former Member
0 Kudos

hi,

you can pass the data of an internal table in the smartform using data calculation tab in the form itself but before that u need to the name of the internal in the Global declaration. However, if u wish to pass the data from internal table to work area and then display the data on the form...then name of the work area must also be declared in the global declaration. Once u r able to pass the data then upon activating the form, FM will be generated which u can find after executing the form. Just copy the fm from there. Then in the print program, use the FM SSF_FUNCTION_MODULE_NAME where u can provide the FM got in the form. Also, the FM got from the form looks very odd. So to make it readable, hard code it using the variable of RS38_L(I'm not sure, check it out) and then click on pattern..first provide the FM got from the form and overwrite the FM with this variable and pass this variable in the abve FM.

chk this

<b>Rewardpoints</b>

Regards