Skip to Content
0
Aug 22, 2011 at 09:27 AM

Form not returning value

20 Views

Hi

I want the ccustomer's email address to also appear on document

The email value is not appearing on the ouput

I searched the forum for examples but can't fin my error

Can someone please assist me?

I'm using the following:

/:PERFORM FIND_MAIL IN PROGRAM Z000MAIL

/:USING &REGUH-LIFNR&

/:USING &REGUH-ZBUKR&

/:CHANGING &MAIL&

/:ENDPERFORM

/ &MAIL&

-


PROGRAM Z000MAIL.

FORM FIND_MAIL TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

TABLES: LFB1.

DATA: LIFNR LIKE LFB1-LIFNR, "Account

BUKRS LIKE LFB1-BUKRS. "Company

  • CLEAR: IN_TAB,

  • OUT_TAB.

READ TABLE IN_TAB INDEX 1.

MOVE IN_TAB-VALUE TO LIFNR. "Account

READ TABLE IN_TAB INDEX 2.

MOVE IN_TAB-VALUE TO BUKRS. "Company

SELECT SINGLE * FROM LFB1 WHERE LIFNR EQ LIFNR

AND BUKRS EQ BUKRS.

READ TABLE OUT_TAB INDEX 1.

MOVE LFB1-INTAD TO OUT_TAB-VALUE.

MODIFY OUT_TAB INDEX 1.

  • CLEAR OUT_TAB.

ENDFORM.