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

form

Former Member
0 Likes
490

IF I'm reading data from tables spfil and sflight do it use FM ( open / wite and close ) twice

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
471

Not necessary. If u r reading these 2 tables and u r having the data in an internal table, then just open the form once and the main window. Then follow the logic as below.

perform begin_form.

Perform OPEN_FORM using formaname windowname etcc..

Loop at itab into wa.

perform write_form using textelementname

endloop.

perform close_form.

perform end_form.

after this make sure u put the wa fields in the form's main window correctly.

&wa_flightname&,,&wa-flightno& etc...

Award points if useful....

Cheers,

Sam

3 REPLIES 3
Read only

Former Member
0 Likes
472

Not necessary. If u r reading these 2 tables and u r having the data in an internal table, then just open the form once and the main window. Then follow the logic as below.

perform begin_form.

Perform OPEN_FORM using formaname windowname etcc..

Loop at itab into wa.

perform write_form using textelementname

endloop.

perform close_form.

perform end_form.

after this make sure u put the wa fields in the form's main window correctly.

&wa_flightname&,,&wa-flightno& etc...

Award points if useful....

Cheers,

Sam

Read only

Former Member
0 Likes
471

Hi Shaheen,

Yes, as per sahmuel solution we can do it.

Hope this helps you, reply for queries, Shall post you the updates.

Regards.

Kumar.

Read only

Former Member
0 Likes
471

Hi,

First you need to create an Internal table to hold the data from the 2 tables (Sflight and Spfli), and after having the final data in the Internal table, then start the Function modulus.

after that you need call the Transaction and pass al the screens ok codes with the internal table data to the BDCDATA structure

CALL the OPEN_FORM function module to open the Session, then call the WRITE form to pass the BDCDATA structure and then call the CLOSE_FORM function module to close the session.

Regards

Sudheer