‎2007 Jun 05 6:58 AM
Dear Friends;
I m first time working on bapi. My requirement is that i m having excel sheet with me and from that excel sheet i need to transfer those data to cats and i m using
bapi BAPI_CATIMESHEETMGR_INSERT . I dont no what parameter to pass
includeing tables
There is one table that is returning from bapi named RETURN mandatory parameter . I want to process those data containing in that table
Please help me
Regards;
Parag Gavkar.
‎2007 Jun 05 7:25 AM
hi ,
i am farwarding some sample code,
here i have declared one internal table i_tab like bapiret2.
why because there is one table that is returning from bapi named RETURN
of type bapiret2.
DATA: i_tab LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'
EXPORTING
businesspartner1 = i_tab_flat-partner_number
businesspartner2 = gv_rpartner_number
relationshipcategory = 'BUR001'
TABLES
return = i_tab.
COMMIT WORK.
after that bapi write this commit work even.
hope this will help u.
‎2007 Jun 05 7:14 AM
Hi Parag,
Usually most of the BAPIs have the table RETURN as one of the returning parametrs. Please check if this is of type BAPIRET2 in the interface of the function module.
If it is so, create a structure ls_return of type BAPIRET2.
Loop at the return table into the ls_return and do the processing you want. Eg : if you want to find if there is any error message, use :
<b>Loop at RETURN into ls_return.
if ls_return-type eq 'E'.
do the processing you want *
endif.
endloop.</b>
Or if you are looking for success message from BAPI call, use :
<b>Loop at RETURN into ls_return.
if ls_return-type eq 'S'.
doisplay the success message to the user*
endif.
endloop.</b>
Hope this helps you.
Reward points if you find this useful.
Regards,
Archana
‎2007 Jun 05 7:25 AM
hi ,
i am farwarding some sample code,
here i have declared one internal table i_tab like bapiret2.
why because there is one table that is returning from bapi named RETURN
of type bapiret2.
DATA: i_tab LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'
EXPORTING
businesspartner1 = i_tab_flat-partner_number
businesspartner2 = gv_rpartner_number
relationshipcategory = 'BUR001'
TABLES
return = i_tab.
COMMIT WORK.
after that bapi write this commit work even.
hope this will help u.