‎2007 May 04 1:41 PM
Hello Experts,
Is there any function module to fetch data from sd module to get data in SMARTFORMS ?
mail me solution on "talele.rahul@gmail.com"
Thanx in advance,
Rahul Talele
‎2007 May 04 1:50 PM
Hi
fun module
SAPSCRIPT_SELECT_PROGRAM gives the driver program for the Script.
you have to use TNAPR table or NACE tcode to know the Smartform, Driver program and output type.
Smartform- Program
LB_BIL_INVOICE -- RLB_INVOICE -for Invoice
LE_SHP_DELNOTE - RLE_DELNOTE -for delivery note
Reward points if useful
Regards
Anji
‎2007 May 04 1:59 PM
Hi Rahul,
Call function 'SSF_FUNCTION_MODULE_NAME' that will give u smartform function name by passing smartform name. then call that FM to transfer data from driver program to smartform.
Refer this code :
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = P_FORM
IMPORTING
FM_NAME = P_FUNCTION
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION P_FUNCTION
TABLES
D_VBRK = IT_VBRK
D_VBRP = IT_VBRP
D_LIKP = IT_LIKP
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reward points if helpful.
regards,
Hemant
‎2007 May 04 2:00 PM
Hi Rahul,
u can also get the driver program name throw table : TNAPR, TTXFT
Reward points if useful..
Regards
Nilesh