cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass internal table data to a form

Former Member
0 Kudos

Hi All,

am new to smart form.I need to know how do we pass internal table data to a smart form.Also i want to know the FM used to get the FM generated upon activating the form.

Thanks,

Rakesh.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rakesh,

We pass internal tables for the smartform are shown in bold in below code,

CALL FUNCTION LF_FM_NAME

EXPORTING

ARCHIVE_INDEX = TOA_DARA

ARCHIVE_PARAMETERS = ARC_PARAMS

CONTROL_PARAMETERS = LS_CONTROL_PARAM

MAIL_RECIPIENT = LS_RECIPIENT

MAIL_SENDER = LS_SENDER

OUTPUT_OPTIONS = LS_COMPOSER_PARAM

USER_SETTINGS = ' '

ZXEKKO = L_DOC-XEKKO

ZXPEKKO = L_DOC-XPEKKO

ZNAST = NAST

IMPORTING

DOCUMENT_OUTPUT_INFO = IT_DOCUMENT

JOB_OUTPUT_INFO = IT_OUTPUT_INFO

JOB_OUTPUT_OPTIONS = IT_JOB_OUTPUT

<b>TABLES

L_XEKPO = L_DOC-XEKPO[]

L_XEKPA = L_DOC-XEKPA[]

L_XPEKPO = L_DOC-XPEKPO[]

L_XEKET = L_DOC-XEKET[]

L_XTKOMV = L_DOC-XTKOMV[]

L_XEKKN = L_DOC-XEKKN[]

L_XEKEK = L_DOC-XEKEK[]

L_XKOMK = L_XKOMK</b>

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

Regards,

Azaz Ali.

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.

This should help in resolving the issue.

Reward points if it is helpful only.

regards,

shamim

Former Member
0 Kudos

Hi rakesh,

chk this