cancel
Showing results for 
Search instead for 
Did you mean: 

Change Bapi wrapper not working.

Former Member
0 Kudos

Hi All,

I am having a problem.I had created a change Bapi Wrapper when i execute change Bapi wrapper in R/3 system it is working properly i.e. its performing the change functionality.But when i try to execute it from program merep_emulator its not working and the data is not getting changed in the backend, also i tried to run the create Bapi wrapper from the middleware via merep_emulator it is working fine. Can any one help me in this regard.

I am attaching the code what i have written for the change Bapi Wrapper.

data zufsm_usrprofile like zufsm_usrprofile occurs 0 with header line.

if IF_USERPROFILE1-SELECT_DYN_DFT eq 'N'.

move-corresponding IF_USERPROFILE1 to ZUFSM_USRPROFILE.

ZUFSM_USRPROFILE-MANDT = sy-mandt.

modify ZUFSM_USRPROFILE.

else.

CASE IF_USERPROFILE1-FEATURE.

WHEN 'PQR'.

update ZUFSM_USRPROFILE

set: SSD = IF_USERPROFILE1-DRT

SSDAREA = IF_USERPROFILE1-DRTAREA

where userid = IF_USERPROFILE1-userid.

WHEN 'XYZ'.

update ZUFSM_USRPROFILE

set: DFSEWC = IF_USERPROFILE1-fcid

where userid = IF_USERPROFILE1-userid.

ENDCASE.

endif.

commit work and wait.

THE STRUCTURE OF ZUFSM_USRPROFILE AND IF_USERPROFILE1 IS NOT SAME. ZUFSM_USRPROFILE IS TABLE OF 30 COLUMN AND IF_USERPROFILE1 IS A STRUCTURE OF 25 COLUMN.

Thanks in Advance.

Devendra Phate.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Devendrakumar,

I think you have modified the BAPI to perform custom update or validations in the backend system. In order for this to work from MI, you would need to activate the BADI in the MI server for that SyncBO ID (Transaction MEREP_PD). I think you are missing that.It should work once that check box is active.

Thanks

Narasimhan

Former Member
0 Kudos

Hi Devendra,

First check the mapping doine in create and Change BAPI Wrapper whether they are consistent which means that the mapping must be same for both of them.

We will not be able to tell if the code attached is correct as the working of BAPI greatly depends on the values being sent from the Middleware.

Below code should be enhanced to know if the values being sent from the middlware is correct or if it is sent at all to the wrappers.

for ex. When using 'Case...Endcase' have an'Others' option to know if any unexpected values is being sent to BAPI or no values itself is being sent.

Also populate the RETURN parameter with appropriate messages to enable us to know the BAPI executed properly

I guess none of the code is being executed in BAPI when executed from MEREP_EMUALTOR because of incorrect mapping.

Thanks....

Preetham S

Former Member
0 Kudos

Hi Devendra,

Are you facing the problem with Change Bapi (i.e. Items change or the header change it self).

What kind of Modify are you trying to do?

Is it creation of new child records or modifying the existing child records or deleting the child records.

Thanks & Regards,

Karthick