‎2010 Sep 20 5:58 AM
Hello Friends
I am using BAPI_ENTRYSHEET_CREATE For creating service entry sheet but i want change the default WBS.
wa_header-po_number = i_disp-ebeln.
wa_header-po_item = '10'.
wa_header-acceptance = 'X'.
wa_header-location = i_disp-location.
wa_header-short_text = i_disp-activity.
wa_header-ref_doc_no = 'Reference Document Number'.
wa_header-doc_date = '20100831'.
wa_header-post_date = '20100831'.
wa_header-begdate = '20100831'.
wa_header-enddate = '20100831'.
wa_header-pckg_no = 1.
wa_header-ACCASSCAT = 'P'.
serial_no = 0.
line_no = 1.
bapi_esll-pckg_no = 1.
bapi_esll-line_no = line_no.
bapi_esll-outl_level = '0'.
bapi_esll-outl_ind = 'X'.
bapi_esll-subpckg_no = 2.
APPEND bapi_esll.
bapiesknc-pckg_no = bapi_esll-pckg_no.
bapiesknc-serial_no = line_no.
APPEND bapiesknc.
CLEAR: bapi_esll.
LOOP AT i_disp.
line_no = line_no + 1.
bapi_esll-pckg_no = 2.
bapiesknc-pckg_no = bapi_esll-pckg_no.
bapi_esll-line_no = line_no.
bapiesknc-serial_no = line_no.
bapi_esll-service = i_disp-serviceno.
bapi_esll-quantity = i_disp-tot_hr.
bapi_esll-gr_price = i_disp-rate.
bapi_esll-EXT_LINE = '0000000010'.
APPEND bapi_esll.
MOVE-CORRESPONDING bapi_esll TO bapiesknc.
CLEAR: bapi_esll.
WBS
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
EXPORTING
input = i_disp-pspnr
IMPORTING
output = bapiesknc-wbs_elem.
bapiesknc-wbs_elem = i_disp-pspnr.
bapiesknc-SERIAL_NO = '10'.
bapiesknc-GL_ACCOUNT = '0052100000'.
bapiesknc-TO_PROJECT = 'X'.
APPEND bapiesknc.
***
ENDLOOP.
CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
EXPORTING
entrysheetheader = wa_header
IMPORTING
entrysheet = ws_entrysheet_no
TABLES
return = i_return
entrysheetsrvaccassvalues = entrysheetsrvaccassvalues
entrysheetservices = bapi_esll
entrysheetaccountassignment = bapiesknc.
here i have passed this different WBS but it is not working will you please give me some suggestions.
Thanks,
Rajan
‎2010 Sep 20 7:56 AM
Hi,
Check SAP Note 536835 and 986683.
The function module calls PSPNUM_EXTERN_TO_INTERN_CONV and external number has to be passed to this BAPI.
Hope it helps.
Sujay