01-04-2008 4:06 AM
Hi,
I have developed a Print Program and smartform.
Now i need to create a transaction code for this application.
I have created Transaction code and the program name has been attached.
If i input the transaction code in sap home screen, i am able to view the Selection screen of the Program. Once i input the value in selsction screen, the system is displayin gSAP home screen instead of proceeding further as per program logic.
If i get into se38 and execute the program, it works fine......
What might be the problem....????
Regards
Pavan
01-04-2008 4:51 AM
Check whether u assigned tcode correctly:-
Tcode : u r tcode.
Radio button selected can be : program and selection screen
Program name: ur program name
And at program:-
Data : Formname like RL38_FNAME
To get name of form dynamically:-
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = '<Name copied from utilities-> environment>'
IMPORTING
FM_NAME = formname
To call u r form:-
CALL FUNCTION v_form_name
EXPORTING
U r parameters
01-04-2008 4:09 AM
pls check,
how u hv pass the smart forms name? & pass the parameters?
check this...
Data: begin of istr1,
vbeln like lips-VBELN,
end of istr1.
Data: v_delno like lips-vbeln.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-d01.
PARAMETERS DEL_NO LIKE LIPS-VBELN.
SELECTION-SCREEN END OF BLOCK B1.
*TITLE1 = 'Selection Data'.
Data: t1 type string.
Data: t2 like t1,t12 like t1.
DATA: t3 like t1,t4 like t1.
v_delno = DEL_NO.
t1 = 'Delivery No : '.
*t2 = v_delno.
t3 = ' is not exists'.
CONCATENATE t1 v_delno t3 into t4.
select vbeln into (istr1-VBELN) from lips
where vbeln eq DEL_NO.
ENDSELECT.
if sy-subrc ne 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a valid line'.
titel = 'GHCL - GatePass'
txt2 = sy-subrc
textline1 = t4."'No data exists for the specified data'.
text1 = 'Delivery No : '.
text2 = v_delno.
text3 = ' is not exists' .
STOP.
EXIT.
endif.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'YSDGATEPASS'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
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 v_form_name
EXPORTING
DELIVERY_NO = DEL_NO
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
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 if it is helpful to u.
Regards,
Arpit
Edited by: Arpit Shah on Jan 4, 2008 9:39 AM
01-04-2008 4:16 AM
Arpit,
The smartform print is working fine, if i input the values in the selection screen through SE38 screen.
The selection screen can be viewd from Z-Tcode. But when i execute it through this path, the system is displaying SAP home screen instead of smartform print window.
Regards
Pavan
01-04-2008 5:01 AM
Hi Pavan,
while creating the Z-tcode,
select the radio button Program and Selection Screen (report transaction)
open se93 in change mode.
goto edit->change transaction type and select Program and Selection Screen (report transaction)
01-04-2008 4:31 AM
hi
good
pls check the parameter that you have passed in se93 ,check which check box you r checking for the smartform execution.
thanks
mrutyun^
01-04-2008 4:51 AM
Check whether u assigned tcode correctly:-
Tcode : u r tcode.
Radio button selected can be : program and selection screen
Program name: ur program name
And at program:-
Data : Formname like RL38_FNAME
To get name of form dynamically:-
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = '<Name copied from utilities-> environment>'
IMPORTING
FM_NAME = formname
To call u r form:-
CALL FUNCTION v_form_name
EXPORTING
U r parameters