Driver Program for Smartform with INPUT PARAMETER
Hi GURUS / EXPERTS,
I have created a smart form with input parameter at GLOBAL SETTING - Form Interface - Import Tab
DOCUMENT TYPE MSEG-MBLNR.
Defined the table u2013 on TABLE tab as u2013 ITAB LIKE MSEG & WA LIKE MSEG.
At MAIN WINDOW:
Added a PROGRAM LINE: On General Attribute mentioned INPUT PARAMETER - DOCUMENT & OUTPUT PARAMETER as ITAB. Written the select statement u2013
select msegmatnr msegcharg msegmenge msegmeins msegebeln mseglifnr maktmaktx into corresponding fields of table itab from mseg inner join makt on msegmatnr = maktmatnr where msegmblnr = document.
Added a Table and on DATA TAB mentioned the loop as
ITAB INTO WA
Added a TEXT and mentioned fields as
QTY: &WA-MENGE& &WA-MEINS&
PO/VENDR: &WA-EBELN& / &WA-LIFNR&
CREATED A DRIVER PROGRAM as:
Now, I want to create a Driver Program for this smart form u2013 Where I want to put GRN No. as INPUT PARAMETER as u201CDOCUMENTu201D to call That SMART FORM.
What should I Do.?
Thanks in Advance.
Raymond Giuseppi replied
When you test the smartfotms the program generates dummy parameters to execute the FM. You too must provide those in the drivers. You need one or two table parameters if I undestand what you wrote:
CALL FUNCTION fm_name EXPORTING document = document TABLES itab = it_itab wa = it_wa EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5.
But you wrote later that you filled those table yourself (select into itab). So remove itab from tab "table" of "Form interface" tab and move it to "global data" of "global definition".