on 09-22-2008 12:09 PM
Hello,
i've been reading about this method to make simple programs in sap forms. I do the same things that you do, but i get no results. I explain:
I do this into the form:
/: DEFINE &ZGW01&
/: PERFORM CALCULATE IN PROGRAM Z_CALCULATE
/: USING &AFVGD-VGW01&
/: CHANGING &ZGW01&
/: ENDPERFORM
In the program i make this:
REPORT Z_CALCULATE.
FORM CALCULATE TABLES IN_TAB structure itcsy
OUT_TAB structure itcsy.
DATA: ZGW01 LIKE AFVGD-VGW01.
Read table IN_TAB index 1.
ZGW01 = IN_TAB-VALUE * 2.
Read table OUT_TAB index 1.
MOVE ZGW01 TO OUT_TAB-VALUE.
Modify OUT_TAB index 1.
ENDFORM.
But i don't get the out_tab-value into the form. Which is the problem?
Does AFVGD-VGW01 have values? Change your form to do this testing to make sure:
Read table IN_TAB index 1.
IF IN_TAB-VALUE IS INITIAL.
ZGW01 = '123.123'.
ELSE.
ZGW01 = IN_TAB-VALUE * 2.
ENDIF.
Also use script debug on your perform.
Regards,
Valter Oliveira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have made a debug in Z program.
I get the next (example):
IN_TAB-VALUE = 3.229
ZGW01 = 6.458
OUT_TAB-NAME = ZGW01
OUT_TAB-VALUE = empty field
Because of that i supose that the problem is on this part of program:
Read table OUT_TAB index 1.
MOVE ZGW01 TO OUT_TAB-VALUE.
Modify OUT_TAB index 1.
Perhaps in the MOVE commad.... i don't know.
hi,
after
MOVE ZGW01 TO OUT_TAB-VALUE.
insert the following line:
SHIFT out_tab-value LEFT DELETING LEADING space.
out_tab-value is a long character type field and probabyl the value is justified right by default.
You can also try to replace the MOVE ... with WRITE ... TO .... (in this case you probably don't need the SHIFT)
hope this helps
ec
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.