2021 Dec 21 7:14 AM
Hi All,
update the email address through EXCEL FILE in ADR6 table based on the LFA1-LIFNR (vendor number) - LFA1-ADRNR (Address number)
(BAPI) use the FM ADDR_COMM_MAINTAIN and FM ADDR_SINGLE_SAVE but this FM doesn't work its through error like parameters_error in sy-subrc = 1.
so anyone's tell how to use these function module for upload the data in the table.
as soon as possible .
Thanks All.
Hi All,
update the email address through EXCEL FILE in ADR6 table based on the LFA1-LIFNR (vendor number) - LFA1-ADRNR (Address number)
(BAPI) use the FM ADDR_COMM_MAINTAIN and FM ADDR_SINGLE_SAVE but this FM doesn't work its through error like parameters_error in sy-subrc = 1.
so anyone's tell how to use these function module for upload the data in the table.
as soon as possible .
Thanks All.
2021 Dec 21 11:14 AM
Please provide a minimal reproducible example so that we can tell you where you're wrong.
NB: sy-subrc = 1 is meaningless information, what is important is the exception name (PARAMETERS_ERROR). Often, the exception is sent with a message number (SY-MSGNO, SY-MSGID).
2021 Dec 21 11:17 AM
Hi, BAPI_ADDRESSORG_CHANGE worked for me . Please refer to below sample code. After the commit, you should see SMTP_ADDR and SMTP_SRCH in ADR6 have changed.
Otherwise please let me know what you get in the return message of BAPI_ADDRESSORG_CHANGE.
<Post was moderated>
DATA:<br>LT_BAPIADSMTP TYPE TABLE OF BAPIADSMTP,<br>LW_BAPIADSMTP LIKE LINE OF LT_BAPIADSMTP,<br>LT_BAPIADSMT_X TYPE TABLE OF BAPIADSMTX,<br>LW_BAPIADSMT_X LIKE LINE OF LT_BAPIADSMT_X,<br>LV_ADDRNO LIKE BAPI4001_1-ADDR_NO,<br>RETURNS TYPE TABLE OF BAPIRET2.<br><br>LW_BAPIADSMTP-STD_NO = 'X'.<br>LW_BAPIADSMTP-E_MAIL = '[email protected]'.<br>LW_BAPIADSMTP-EMAIL_SRCH = '[email protected]'.<br>APPEND LW_BAPIADSMTP TO LT_BAPIADSMTP.<br><br>LW_BAPIADSMT_X-UPDATEFLAG = 'U'. "I=Insert, U=Update D=Delete<br>LW_BAPIADSMT_X-E_MAIL = 'X'.<br>LW_BAPIADSMT_X-EMAIL_SRCH = 'X'.<br>APPEND LW_BAPIADSMT_X TO LT_BAPIADSMT_X.<br><br>CALL FUNCTION 'BAPI_ADDRESSORG_CHANGE'<br> EXPORTING<br> OBJ_TYPE = 'LFA1'<br> OBJ_ID = 'VE101' "Your vendor number<br>IMPORTING<br> ADDRESS_NUMBER = LV_ADDRNO<br>TABLES<br> BAPIADSMTP = LT_BAPIADSMTP<br> BAPIADSMT_X = LT_BAPIADSMT_X<br> RETURN = RETURNS.<br><br> IF SY-SUBRC <> 0.<br> ROLLBACK WORK.<br> ELSE.<br> COMMIT WORK AND WAIT.<br> ENDIF.<br>
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |