Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performing a form from sapscript

Former Member
0 Likes
467

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
441

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

2 REPLIES 2
Read only

Former Member
0 Likes
442

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

Read only

Former Member
0 Likes
441

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