Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Perform in sapscript

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?

Former Member
replied

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

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question