‎2008 Jul 17 8:44 AM
Hi all,
I have created a sapscript form and now want to control which program has called this form.
this is the code at sapscript side:
/: PERFORM WHO_CALLED IN PROGRAM Z_FI_HEF130D
/: USING &TIPI&
/: IF &TIPI& = 'X'.
/: INCLUDE ZPROFORMA_01 OBJECT TEXT ID ST LANGUAGE EN
/: INCLUDE ZPROFORMA_03 OBJECT TEXT ID ST LANGUAGE EN
/: ELSE.
/: INCLUDE ZPROFORMA_01 OBJECT TEXT ID ST LANGUAGE EN
/: INCLUDE ZPROFORMA_02 OBJECT TEXT ID ST LANGUAGE EN
/: ENDIF.
/: ENDPERFORM.
And this is the form at program Z_FI_HEF130D:
FORM WHO_CALLED USING tipi.
tipi = 'X'.
ENDFORM. "WHO_CALLED
But tipi is never set to 'X' even I have run the program it has been set.
What could be the problem?
Thanks.
Deniz.
‎2008 Jul 17 8:50 AM
Hi!
Try changing instead of using. And you have to close the perform with and endperform statement.
Put a break-point into your program Z_FI_HEF130D to see, is it working good or not?
/: PERFORM WHO_CALLED IN PROGRAM Z_FI_HEF130D
/: CHANGING &TIPI&
/: ENDPERFORM.
/: IF &TIPI& = 'X'.
/: INCLUDE ZPROFORMA_01 OBJECT TEXT ID ST LANGUAGE EN
/: INCLUDE ZPROFORMA_03 OBJECT TEXT ID ST LANGUAGE EN
/: ELSE.
/: INCLUDE ZPROFORMA_01 OBJECT TEXT ID ST LANGUAGE EN
/: INCLUDE ZPROFORMA_02 OBJECT TEXT ID ST LANGUAGE EN
/: ENDIF.
Check out this link, if you are still unsure, how it is working.
http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
Regards
Tamás
Edited by: Tamás Nyisztor on Jul 17, 2008 9:52 AM
‎2008 Jul 17 8:50 AM
Hi!
Try changing instead of using. And you have to close the perform with and endperform statement.
Put a break-point into your program Z_FI_HEF130D to see, is it working good or not?
/: PERFORM WHO_CALLED IN PROGRAM Z_FI_HEF130D
/: CHANGING &TIPI&
/: ENDPERFORM.
/: IF &TIPI& = 'X'.
/: INCLUDE ZPROFORMA_01 OBJECT TEXT ID ST LANGUAGE EN
/: INCLUDE ZPROFORMA_03 OBJECT TEXT ID ST LANGUAGE EN
/: ELSE.
/: INCLUDE ZPROFORMA_01 OBJECT TEXT ID ST LANGUAGE EN
/: INCLUDE ZPROFORMA_02 OBJECT TEXT ID ST LANGUAGE EN
/: ENDIF.
Check out this link, if you are still unsure, how it is working.
http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
Regards
Tamás
Edited by: Tamás Nyisztor on Jul 17, 2008 9:52 AM
‎2008 Jul 18 8:53 AM
Hi!
Try this...
FORM WHO_CALLED
TABLES input_table structure itcsy
output_table structure itcsy.
data: x_tipi(100).
move input_table-value to x_tipi.
x_tipi = 'X'.
move x_tipi to output_table-value.
clear x_tipi.
ENDFORM. "WHO_CALLED