‎2009 Feb 11 5:48 AM
Hi Experts,
I want to call one smartform in a background program, i am very new to smartform .Can anybody help me to do this?
I want to suppress the dialog box appearing while directly executing the smartform?
Also please tell me how i can give the smartform data to spool?
Regards,
Ratheesh
‎2009 Feb 11 5:53 AM
Hello Friend,
Anyhow u write a driver program to call smartform using this Fm SSF_FUNCTION_MODULE_NAME
so u can run the report Back ground...
Thank u,
santhosh
‎2009 Feb 11 5:59 AM
Hi,
To supress the dialog box appearing while directly executing the smartform you can do it by
setting the CONTROL PARAMETERS .
In this set control-no_dialog = 'X'.
then it will directly executes.
Regards,
jaya
‎2009 Feb 11 6:02 AM
Thanks for the rply,
My question is while executing the driver program, Does the printing will happen directly from the spool or not?
Regards,
Ratheesh
‎2009 Feb 11 6:03 AM
‎2009 Feb 11 6:18 AM
Hi,
in the driver program change the user settings to SPACE,it will work.
Regards,
jaya
‎2009 Feb 11 7:55 AM
Hi,
I tried using No dialog = 'X' and user setting = ' ' ,but still the dialog box is appearing.
Can you please help?
Regards,
Ratheesh
‎2009 Feb 11 6:26 AM
Hi Ratheesh,
First you create Form . in print program you have to read the data from data bace table table "nast". and Based on the NAST-OBJKY retrive your data.
DATA : RETURN_CODE TYPE SY-SUBRC,
US_SCREEN TYPE C,
P_ORDER LIKE NAST-OBJKY.
DATA: RETCODE LIKE SY-SUBRC. "Returncode
DATA: XSCREEN(1) TYPE C. "Output on printer or screen
DATA: REPEAT(1) TYPE C.
DATA : LT_TEXT LIKE TLINE-TDLINE.
CLEAR RETCODE.
XSCREEN = US_SCREEN.
SELECT SINGLE *
FROM NAST INTO NAST WHERE OBJKY = NAST-OBJKY. "P_VBELN.
PERFORM GET_DATA.
CASE RETCODE.
WHEN 0.
RETURN_CODE = 0.
WHEN 3.
RETURN_CODE = 3.
WHEN OTHERS.
RETURN_CODE = 1.
ENDCASE.
FORM GET_DATA .
P_ORDER = NAST-OBJKY.
SELECT VBELN
AUDAT
WAERK
KUNNR
VDATU
FROM VBAK
INTO TABLE TB_VBAK
WHERE VBELN = P_ORDER.
IF NOT TB_VBAK[] IS INITIAL.
SELECT VBELN
POSNR
MATNR
KWMENG
NETPR
NETWR
BRGEW
GEWEI
VOLUM
VOLEH
CHARG
WERKS
POSEX
KDMAT
FROM VBAP
INTO TABLE TB_VBAP
FOR ALL ENTRIES IN TB_VBAK
WHERE VBELN = TB_VBAK-VBELN.
ENDIF.
endform. After complete this go through NACE transaction in that select required out put type and give you form name and Program name.
then go through the transaction in display mode and select the print preview. you will get your lay oput.
here You must give output type in proper.