on 08-22-2011 10:27 AM
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 ®UH-LIFNR&
/:USING ®UH-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.
Hi
The Sapscript returns a value in the output form, so you need to convert it in the input form; I mean you make sure a certain variable has or doesn't have a convertion routine,
In your case LIFNR has the convertion routine ALPHA, so before using it you need to convert LIFNR by that routine:
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
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = LIFNR
IMPORTING
OUTPUT = LIFNR.
SELECT SINGLE * FROM LFB1 WHERE LIFNR EQ LIFNR
AND BUKRS EQ BUKRS.
max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SELECT SINGLE * FROM LFB1 WHERE LIFNR EQ LIFNR
AND BUKRS EQ BUKRS.
What happens here? What's the return code? Is LFB1-INTAD populated? You probably should be getting from ADR6, using LFA1-ADRNR or perhaps the address or person number from the contact persons table, based upon the partner code for the person you're trying to email....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
8 | |
6 | |
5 | |
5 | |
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.