on 02-23-2007 4:15 PM
Hi ,
I am using the define statement in combination with perform in my sap script
like /: DEFINE &OBJECT& = 'QMSM'
then the perform comes like
PERFORM GET_SAP_SCRIPT PROGRAM zTEXTS
USING &OBJECT&
CHANGING &TEXT&
report ztext.
form get_sap_script TABLES in_tab STRUCTURE ITCSY
out_tab STRUCTURE ITCSY .
.
.
.
.
now when the debugger reaches in side the form in the program
the values of in_tab is expected as in_tab-name = OBJECT
and in_tab-value = 'QMSM'
but it is coming like
in_tab-name = OBJECT
in_tab-value = Object....
maybe something silly from my side...
kindly help..
Hi Guys ,
I got it .....I think I was using a reserved word 'object' as the variable name that's why system was filling the value in it and overriding the value which I was providing .
Silly thing you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If answers are helpful reward with some points apart from THANKS .. :).
Br,
Laxmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
check by mistake you may be overtime the OBJECT value before calling the perform. read the In_tab based on a condition and check the value.
Br,
Laxmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
YOUR FORM:
...
Element YOURELEMENT
/: DEFINE &OBJECT& = 'QMSM'
/: PERFORM GET_SAP_SCRIPT IN PROGRAM ZTEXTS
/: USING &OBJECT&
/: CHANGING &TEXT&
/: ENDPERFORM
...
YOUR PROGRAM:
REPORT ztext.
...
&----
*& Form GET_NAME
&----
FORM get_sap_script TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
read first line of in_tab
READ TABLE in_tab INDEX 1.
select from z_your_table and modify out_tab with new data
SELECT SINGLE * FROM z_your_table
WHERE xx = in_tab-value(8).
IF sy-subrc = 0.
READ TABLE out_tab INDEX 1.
MOVE z_your_table-name TO out_tab-value.
MODIFY out_tab INDEX sy-tabix.
ELSE.
READ TABLE out_tab INDEX 1.
MOVE 'no name' TO out_tab-value.
MODIFY out_tab INDEX sy-tabix.
ENDIF.
ENDFORM. " get_sap_script
Hope it helps, if not, write again.
Regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.