Hello Guys,
i need to convert a smartform to a PDF and send it via mail from a Spool-Request. I managed to do the conversion with the FM 'SSF_FUNCTION_MODULE_NAME' and then call the smartform with 'CALL FUNCTION v_form_name' and it works.
The smartform has import parameters that need to be filled with data so the smartform won't be empty.
DATA: gv_addr TYPE addr_key, gv_nast TYPE nast, gv_vbdka TYPE vbdka, gv_vbdpa LIKE TABLE OF vbdpa, gv_vbdpau LIKE TABLE OF vbdpau. CALL FUNCTION v_form_name EXPORTING control_parameters = w_ctrlop output_options = w_compop is_addres = gv_addr is_nast = gv_nast is_vbdka = gv_vbdka user_settings = 'X' IMPORTING job_output_info = w_return TABLES it_vbdpa = gv_vbdpa it_vbdpau = gv_vbdpau EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5.
is_addres, is_nast and is_vbdka are required.
The interface of the smartform IMPORT PARAMETERS are as followed:
*" VALUE(ARCHIVE_INDEX) TYPE TOA_DARA OPTIONAL *" VALUE(ARCHIVE_INDEX_TAB) TYPE TSFDARA OPTIONAL *" VALUE(ARCHIVE_PARAMETERS) TYPE ARC_PARAMS OPTIONAL *" VALUE(CONTROL_PARAMETERS) TYPE SSFCTRLOP OPTIONAL *" VALUE(MAIL_APPL_OBJ) TYPE SWOTOBJID OPTIONAL *" VALUE(MAIL_RECIPIENT) TYPE SWOTOBJID OPTIONAL *" VALUE(MAIL_SENDER) TYPE SWOTOBJID OPTIONAL *" VALUE(OUTPUT_OPTIONS) TYPE SSFCOMPOP OPTIONAL *" VALUE(USER_SETTINGS) TYPE TDBOOL DEFAULT 'X' *" VALUE(IS_VBDKA) TYPE VBDKA *" VALUE(IS_NAST) TYPE NAST *" VALUE(IS_ADDRES) TYPE ADDR_KEY
I can't find any relation between those. The ADRNR in the NAST table is empty, it is the only possible relation i found to get the data i need. Even the spool request in the SP01 transaction doesn't give me any information on how to fill those.
If i run my Program the mail gets sent (but not immediatly immediately). The PDF File has the structure of the smartform in it, but not the data that is required. See here :
If there is any way to fill those parameters and you could tell me or any other way to do that, i would be thankful.