BAPI_ENTRYSHEET_CREATE ESSR-BKTXT
In ML81N I have field ESSR-BKTXT (document header text).
How can I fill it using BAPI BAPI_ENTRYSHEET_CREATE?. It seems not present in structure BAPIESSRC.
Please help me.
I faced the similar issue recently in one of the projects. The solution that i have opted is as below -
1. I leveraged the changing parameter 'ESSR' work area of the user exit 'EXIT_SAPLMLSR_010'. This user exit is internally called via BAPI_ENTRYSHEET_CREATE.
2. You can export the value of 'ESSR-BKTXT' field to memory ID from the calling program and import it within this user exit and pass it to changing parameter ESSR.
Hope this helps to other readers too!
- Thanks,
Urvi.
Similar Messages
-
Populate document header text in SES by bapi BAPI_ENTRYSHEET_CREATE
Hi,
I am using BAPI BAPI_ENTRYSHEET_CREATE to create a service entry sheet. But I am not able to populate the document header text (bktxt) in acceptance tab in service entry sheet header in ML81N.
Can anybody help me what I need to pass to this BAPI in order to populate this field.
Thanks,
MainakHey Mainak,
I am aware that the question was posted by you long back, but I am replying so that other readers probably can benefit from the answer below -
I faced the similar issue recently in one of the projects. The solution that i have opted is as below -
1. I leveraged the changing parameter 'ESSR' work area of the user exit 'EXIT_SAPLMLSR_010'. This user exit is internally called via BAPI_ENTRYSHEET_CREATE.
2. You can export the value of 'ESSR-BKTXT' field to memory ID from the calling program and import it within this user exit and pass it to changing parameter ESSR.
Hope this helps to other readers!
- Thanks,
Urvi. -
Error while creation of service entry via BAPI_ENTRYSHEET_CREATE
Hi All,
I am struggling while creation of service entry using the BAPI, BAPI_ENTRYSHEET_CREATE. I am getting error ""No account assignment exists for service line 0000000010". I am passing the essr, eskn,eskl, esll structures as-
Please help sorting out what is the issue in the parameters, I am able to manually create an SER via ML81N though.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
PURCHASEORDER = WS_PO
ITEMS = 'X'
SERVICES = 'X'
IMPORTING
PO_HEADER = WA_PO_HEADER
TABLES
PO_ITEMS = PO_ITEMS
PO_ITEM_SERVICES = PO_SERVICES
RETURN = BAPI_RETURN_PO.
Entry sheet header
LOOP AT PO_ITEMS.
BAPI_ESSR-PO_NUMBER = PO_ITEMS-PO_NUMBER.
BAPI_ESSR-PO_ITEM = PO_ITEMS-PO_ITEM.
BAPI_ESSR-SHORT_TEXT = 'Sample'.
bapi_essr-acceptance = 'X'.
BAPI_ESSR-DOC_DATE = SY-DATUM. " wa_po_header-doc_date.
BAPI_ESSR-POST_DATE = SY-DATUM. "po_items-price_date.
IF PO_ITEMS-ACCTASSCAT = 'U'.
BAPI_ESSR-ACCASSCAT = 'K'.
ELSE.
BAPI_ESSR-ACCASSCAT = PO_ITEMS-ACCTASSCAT.
ENDIF.
BAPI_ESSR-PCKG_NO = PO_ITEMS-PCKG_NO.
APPEND BAPI_ESSR.
ENDLOOP.
LINE_NO = 1.
SERIAL_NO = 0.
LOOP AT PO_SERVICES. " WHERE NOT short_text IS INITIAL.
CLEAR BAPI_ESLL.
BAPI_ESLL-PCKG_NO = PO_SERVICES-PCKG_NO.
BAPI_ESLL-LINE_NO = LINE_NO.
BAPI_ESLL-EXT_LINE = PO_SERVICES-EXT_LINE.
BAPI_ESLL-OUTL_IND = PO_SERVICES-OUTL_IND.
BAPI_ESLL-SUBPCKG_NO = PO_SERVICES-SUBPCKG_NO.
BAPI_ESLL-SERVICE = PO_SERVICES-SERVICE.
BAPI_ESLL-BASE_UOM = PO_SERVICES-BASE_UOM.
BAPI_ESLL-UOM_ISO = PO_SERVICES-UOM_ISO.
BAPI_ESLL-PRICE_UNIT = PO_SERVICES-PRICE_UNIT.
BAPI_ESLL-FROM_LINE = PO_SERVICES-FROM_LINE.
BAPI_ESLL-TO_LINE = PO_SERVICES-TO_LINE.
BAPI_ESLL-SHORT_TEXT = PO_SERVICES-SHORT_TEXT.
BAPI_ESLL-PLN_PCKG = '2'.
BAPI_ESLL-PLN_LINE = LINE_NO.
APPEND BAPI_ESLL.
LINE_NO = LINE_NO + 1.
ENDLOOP.
Now we wanted to create SES based on entered Quantity & NetValue.
LOOP AT BAPI_ESLL.
IF BAPI_ESLL-LINE_NO = '2'.
BAPI_ESLL-QUANTITY = PO_SERVICES-QUANTITY.
BAPI_ESLL-GR_PRICE = WS_PR. "po_services-gr_price.
MODIFY BAPI_ESLL INDEX SY-TABIX TRANSPORTING QUANTITY GR_PRICE.
ENDIF.
ENDLOOP.
LOOP AT PO_ITEMS.
CLEAR BAPI_ESKL.
BAPI_ESKL-LINE_NO = 2.
BAPI_ESKL-SERNO_LINE = 1.
BAPI_ESKL-PERCENTAGE = 100.
BAPI_ESKL-SERIAL_NO = 1.
APPEND BAPI_ESKL.
SERIAL_NO = SERIAL_NO + 1.
BAPI_ESKN-GL_ACCOUNT = PO_ITEMS-MAT_GRP.
BAPI_ESKN-PCKG_NO = '2'.
BAPI_ESKN-SERIAL_NO = SERIAL_NO.
APPEND BAPI_ESKN.
ENDLOOP.
CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
EXPORTING
ENTRYSHEETHEADER = BAPI_ESSR
TESTRUN = ''
IMPORTING
ENTRYSHEET = WS_ENTRYSHEET_NO
TABLES
ENTRYSHEETACCOUNTASSIGNMENT = BAPI_ESKN
ENTRYSHEETSERVICES = BAPI_ESLL
ENTRYSHEETSRVACCASSVALUES = BAPI_ESKL
RETURN = I_RETURN.
Thanks!!The issue resolved now by passing the following parameters-
EntrySheet header-
BAPI_ESSR-PO_NUMBER = PO_NUMBER.
BAPI_ESSR-PO_ITEM = PO_ITEM.
BAPI_ESSR-SHORT_TEXT = as entered by user
BAPI_ESSR-ACCEPTANCE = u2018Xu2019 or space.
BAPI_ESSR-DOC_DATE = Todayu2019s date.
BAPI_ESSR-POST_DATE = Todayu2019s date.
BAPI_ESSR-PCKG_NO = '0000000001'.
Entry Sheet Account Assignment-
BAPI_ESKN-COSTCENTER = Cost Center
BAPI_ESKN-WBS_ELEMENT = WBS element
BAPI_ESKN-AUFNR = Order
Entry Sheet Services-
Unplanned line-
BAPI_ESLL-PCKG_NO = '0000000001'.
BAPI_ESLL-LINE_NO = LINE_NO (000001).
BAPI_ESLL-EXT_LINE = '0000000000'.
BAPI_ESLL-OUTL_LEVEL = 0.
BAPI_ESLL-OUTL_IND = 'X'.
BAPI_ESLL-SUBPCKG_NO = '0000000002'.
Planned line-
BAPI_ESLL-LINE_NO = LINE_NO (000002).
BAPI_ESLL-PCKG_NO = '0000000002'.
BAPI_ESLL-SUBPCKG_NO = '0000000000'.
BAPI_ESLL-EXT_LINE = '0000000010'.
BAPI_ESLL-SERVICE = '0000000000'.
BAPI_ESLL-OUTL_LEVEL = 0.
BAPI_ESLL-OUTL_IND = ' '.
BAPI_ESLL-QUANTITY = as entered by user
BAPI_ESLL-BASE_UOM = PO_SERVICES-BASE_UOM.
BAPI_ESLL-GR_PRICE = as entered by user
BAPI_ESLL-PLN_PCKG = '0000000000'.
BAPI_ESLL-PLN_LINE = '0000000001'.
Entry Sheet Service access values-
BAPI_ESKL-LINE_NO = '2'.
BAPI_ESKL-PCKG_NO = '0000000002'.
BAPI_ESKL-PERCENTAGE = '100'.
Thankyou! -
I need to create service entry sheet ( SES ) using input data from text file through BAPI_ENTRYSHEET_CREATE.
If the input contains service line items, which are not present in PO, it should be treated as an unplanned service and correspondingly 'unplanned' indicator is to be set on ML81N ( Service netry sheet ) display.
I want to make an entry unplanned if the input field external no. ( Field: BAPIESLLC-EXT_LINE ) is not matching with external no. field of corresponding purchase order to which the SES refers.
The BAPI works fine for all cases except one. If the unplanned service line contains field SERVICE_NO value which is matching with a SERVICE_NO in PO, it is invariable treated by BAPI as 'PLANNED'. ie. BAPI decides whenther a service line is planned or unplanned based on SERVICE_NO only.
For eg. Let a PO contains one service line with SERVICE_NO value 1008505.
If SES input file contains 2 service entries with SERVICE_NO value 1008505.
While creating SES, the BAPI should treat first entry as 'planned' and second line as 'unplanned'.
But while running the program, both lines are created as 'Planned' only, since SERVICE_NO value 1008505 exists in the PO.
I need to set the service line planned/unplanned through my prgram, overriding the automatic setting up of BAPI_ENTRYSHEET_CREATE.
Hope this clarifies my requirement.
Grateful if somebody cam provide a solution.
Thanks & Regards,
ManjuDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
How to change Service Item using BAPI_ENTRYSHEET_CREATE.
Hi All,
There's a requirement for me to upload/ Create Entry Sheet using BAPI_ENTRYSHEET_CREATE from the source file.
The Header was given to me but the Service Item, they would like the flexibility to change the existing lines that was adopted from ML81N.
Eg of the file.
Header given:-
PO NO
Po Item
Short Text
Ext Entry Sheet No
Service Location
Period Start
Period End ....n so on
Service Item given:-
Service Line (Extrow)
Service Order Qty (Memge)
Ext Service No (EXTSRVNO)
The objective of this file is
1) Create Service Entry Sheet (using Header)
2) Adopt the Service Item
3) Change Service Item (using Service Item)
Could anyone guide me how to do it? If Using BAPI_ENTRYSHEET_CREATE...is actually creating it with full details of the upload file. but given to me, t requrement is they would like to create n change the item.
Appreciates your help.
Thank you.
Regards,
Sheena WeeHi ,
If you are trying to test the FM through TCode SE37 then it will not give you the desired output.Do one thing create a test program and there you call the FM with your data.I hope in this way you can solve the issue.
Regards,
Sarbajit. -
BAPI_ENTRYSHEET_CREATE
Hi,
I am using BAPI_ENTRYSHEET_CREATE to create service entries in ML81N. Once the entry sheet is created I want to see the account assignment of service line with "Distribution on Quantity Basis". However, the BAPI creates it by percentage distribution. Please let me know what else needs to be done to get the distribution on quantity basis.
Here is how I am filling the tables of the BAPI.
ENTRYSHEETHEADER
BEGDATE ENDDATE PCKG_NO SHORT_TEXT PO_NUMBER PO_ITEM DOC_DATE POST_DATE
21.04.2014 27.04.2014 0000000001 ROB SCHROEDER W/E 04/21/2014 4500436511 00016 06.05.2014 06.05.2014
ENTRYSHEETACCOUNTASSIGNMENT
PCKG_NO SE GL_ACCOUNT WBS_ELEM COUNTER
0000000001 01 42100100 T.3000491.02.00.00 00000001
0000000001 02 42100100 T.3000491.01.01.90 00000000
0000000001 03 42100100 T.3000491.02.00.00 00000000
0000000001 04 42100100 T.3000491.02.00.00 00000000
ENTRYSHEETSERVICES
PCKG_NO LINE_NO EXT_LINE OUTL_LEVEL SUBPCKG_NO SERVICE QUANTITY BASE_UOM UOM_ISO PRICE_UNIT GR_PRICE SHORT_TEXT DISTRIB PERS_NO
0000000001 0000000001 0000000000 X 0000000002 0.000 0 0.0000 1
0000000002 0000000002 0000000010 0000000000 40.000 HRS HRS 1 10.0000
RSCHROEDER - STD 04/21/2014 1 90000011
0000000002 0000000003 0000000020 0000000000 8.000 HRS HRS 1 15.0000
RSCHROEDER - OT 04/21/2014 1 90000011
0000000002 0000000004 0000000030 0000000000 8.000 HRS HRS 1 20.0000
RSCHROEDER - OT 04/21/2014 1 90000011
ENTRYSHEETSRVACCASSVALUES
PCKG_NO LINE_NO SE PERCEN SE QUANTITY NET_VALUE
0000000002 0000000002 01 37.5 01 15.000 0.00
0000000002 0000000002 02 62.5 02 25.000 0.00
0000000002 0000000003 03 100.0 03 8.000 0.00
0000000002 0000000004 04 100.0 04 8.000 0.00
Three entry sheets are created as shown in 1st Screenshot. If I get into the account assignment of line 10, I get the values shown in screenshot 2.
NOTE:- While entering values to table ENTRYSHEETSRVACCASSVALUES I tried keeping the field PERCEN as blank but that didn't help as well. I get an error -
E 06
408 Please enter account assignment
Thanks,
RakeshLooking for any help...
-
Dump during BAPI_ENTRYSHEET_CREATE calling from Portal
Hi,
I am getting dump during creation of Service Entry Sheet using the 'BAPI_ENTRYSHEET_CREATE' when triggering it from Portal end. But if I directly call the FM from ECC6.0 with the same passing values it gives me the success meassage. The dump only occurs when I am triggering it from Portal via another custom RFC funtion module.
I have checked in ST22 and the message text is like ....." Exception condition "GUI_NO_MODE_AVAILABLE" raised."
Also have checked the SAP Note1271652 and have suggested to apply kernel patch 184. But kernel patch 185 already been applied as our basis team have confirmed. Can you please help me out of this situaion.
Thanks & Regards,
ApurbaHi,
I came across this issue and have blogged a solution that gets round it for our purposes. This may help:
http://community.altiusconsulting.com/blogs/adamadshead/archive/2009/09/24/bex-analyzer-s-file-upload-bug-when-integrated-with-sap-portal.aspx
Regards,
Adam -
How to use BAPI_ENTRYSHEET_CREATE
Iam new to use BAPI_ENTRYSHEET_CREATE.
What are the mandatory fields that should be passed to it to create SES ( Service Entry Sheet ).
The data given to me is:
Purchase Ord number,
Activity Number,
Rate,
Quantity,
External Number.
Is the above data is enough to create SES.
Please give me the valuble information as early as possible.Check the below code:
REPORT ypra_sample42.
DATA: wa_header TYPE bapiessrc,
i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
ws_entrysheet_no TYPE bapiessr-sheet_no,
i_service TYPE bapiesllc OCCURS 0 WITH HEADER LINE,
i_service_acc TYPE bapiesklc OCCURS 0 WITH HEADER LINE,
i_service_text TYPE bapieslltx OCCURS 0 WITH HEADER LINE,
i_account TYPE bapiesknc OCCURS 0 WITH HEADER LINE,
ws_pack_no TYPE packno.
DATA: ws_po TYPE bapiekko-po_number,
po_items TYPE bapiekpo OCCURS 0 WITH HEADER LINE,
po_services TYPE bapiesll OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF wa_po_header OCCURS 1.
INCLUDE STRUCTURE bapiekkol.
DATA: END OF wa_po_header.
DATA: BEGIN OF bapi_return_po OCCURS 1.
INCLUDE STRUCTURE bapireturn.
DATA: END OF bapi_return_po.
DATA: serial_no LIKE bapiesknc-serial_no,
line_no LIKE bapiesllc-line_no.
DATA: bapi_esll LIKE bapiesllc OCCURS 1
WITH HEADER LINE.
ws_po = '4300000066'.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
purchaseorder = ws_po
items = 'X'
services = 'X'
IMPORTING
po_header = wa_po_header
TABLES
po_items = po_items
po_item_services = po_services
return = bapi_return_po.
wa_header-po_number = po_items-po_number.
wa_header-po_item = po_items-po_item.
wa_header-short_text = 'Sample'.
wa_header-acceptance = 'X'.
wa_header-doc_date = sy-datum.
wa_header-post_date = sy-datum.
wa_header-pckg_no = 1.
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.
LOOP AT po_services WHERE NOT short_text IS INITIAL.
line_no = line_no + 1.
CLEAR bapi_esll.
MOVE-CORRESPONDING po_services TO bapi_esll.
bapi_esll-gr_price = '456'.
bapi_esll-pckg_no = 2.
bapi_esll-line_no = line_no.
bapi_esll-service = po_services-service.
bapi_esll-quantity = po_services-quantity.
bapi_esll-gr_price = po_services-gr_price.
bapi_esll-price_unit = po_services-price_unit.
APPEND bapi_esll.
ENDLOOP.
CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
EXPORTING
entrysheetheader = wa_header
testrun = 'X'
IMPORTING
entrysheet = ws_entrysheet_no
TABLES
ENTRYSHEETACCOUNTASSIGNMENT =
entrysheetservices = bapi_esll
entrysheetsrvaccassvalues = i_service_acc
return = i_return
entrysheetservicestexts = i_service_text
ENTRYSHEETHEADERTEXT =
break gbpra8.
LOOP AT i_return.
ENDLOOP.
DATA: ws_wait TYPE bapita-wait.
ws_wait = '3'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ws_wait.
Regards,
Prakash. -
Creation of service entry using BAPI_ENTRYSHEET_CREATE
Hi Experts,
I have a requirement to create a service entry using BAPI with multiple account assignments. It can be distributed by quantity or percentage. Please give sample code.
Thanks,
LalynHi,
Please go through the function module BAPI_ENTRYSHEET_CREATE documentation and the documentation available in importing, exporting, tables on the right hand side with green buttons. Then you can able to know how to use this bapi. -
BAPI_ACC_DOCUMENT_POST problem in header text(bktxt)
Hi experts,
Am using bapi BAPI_ACC_DOCUMENT_POST for gl upload for t-code f-02. the problem is header text(bktxt) is not uploading in fb03. how to solve this problem??
Regards,
Sunita.Because BAPI: BAPI_ACC_DOCUMENT_POST will Check BADI with Posting
1.BADI Information:
(1)Object Type Name(Interface) is IF_EX_AC_DOCUMENT (T-code: SE24)
(2)Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK
2.Reason:
(1)Once This BADI has been created for any reason,
BAPI:BAPI_ACC_DOCUMENT_CHECK & BAPI_ACC_DOCUMENT_POST
will check it for Document Header Text
(2)If Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK has been created for any reason,
but Creator return an null Document Header Text, then BAPI will clear Document Header Text
3.Solution:
(1)Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,
please refer to (2) for detail source code below
(2)
DATA: wa_header TYPE acchd.
IF sy-xprog EQ 'SAPLBPFC'.
*---<SAPLBPFC> is for Posting with BAPI: BAPI_ACC_DOCUMENT_CHECK
*---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_POST
CLEAR wa_header.
wa_header = im_document-header.
ex_document-header-bktxt = wa_header-bktxt.
CLEAR wa_header.
ENDIF. -
PACKNO inside ESKN is not listed in ESLH, but listed in LBLNI inside ESSR
Dear All,
I check PACKNO field of table ESKN with SE11 and find out that ESKN-PACKNO has a check table which is ESLH, also field PACKNO
But !!!!
I cannot find any PACKNO values inside table ESKN with PACKNO inside table ESLH.
<b>It should that every PACKNO inside ESKN is registered inside ESLH table. Right ?</b>
But, I found out that ESKN-PACKNO data is filled with LBLNI from ESSR. From this site.
http://www.jt77.com/material/management-29211.html
<b>This is not consistent between what I see in SE11 and what I browse with SE16</b>
Unfortunately, that website is telling the truth. And how my R3 4.7 behaves.
Yes, I download all ESKN-PACKNO to text files (around 10.000) and check with SE16-LBLNI and all number is match !
I download all ESKN-PACKNO to text files (around 10.000) and check with SE16-ESLH <b>and none match !</b>
Any explain ? Is this sap error ? should ESKN-PACKNO is a foreign key with ESLH-PACKNO but it can have values which is not contained in ESLH-PACKNO ?
Instead, all ESKN-PACNO is ESSR-LBLNI ???????
BW AhmadHi
It's yes from MM point of view, which is ESSR-LBLINI --> ESKN-PACKNO
but BIG NO for abapers or somebody who understand the meaning of check table.
If you use t-code SE11 and type ESKN, you will see that ESKN-PACKNO check table is not ESSR-LBLNI.
As I cannot upload pictures to this site, this site might help you understand what I try to say:
http://bwas.sap.googlepages.com/essrandesknharmony
Regards,
BW Ahmad -
Problem with BAPI_ENTRYSHEET_CREATE
Hi Experts,
In my upload program for Service Entry Sheet (ML81N) i am using BAPI_ENTRYSHEET_CREATE.I am reading all the PO related information (like PO, item, quantity, gross price, network, activity etc) from a flat file.Program is successfully creating the Service Entry Sheet, but the problem is that it is not picking the network value from the flat file, instead it is picking network value from the PO.
I am populating the bapi structures as follows:
Refresh iEsll.
Refresh iEskn.
***To populate Header Data of Entry Sheet(BAPIESSRC)
Clear wEssr.
wEssr-pckg_no = c1.
wEssr-short_text = short text from flat file
wEssr-po_number = PO from flat file
wEssr-po_item = PO Item from flat file
wEssr-location = Location from flat file
wEssr-doc_date = sy-datum.
wEssr-post_date = sy-datum.
wEssr-acceptance = cX.
***To populate Services Data of Entry Sheet(BAPIESLLC)
Clear wEsll.
wEsll-pckg_no = c1.
wEsll-line_no = c1.
wEsll-ext_line = c0.
wEsll-outl_level = c0.
wEsll-outl_ind = cX.
wEsll-subpckg_no = c2.
Append wEsll To iEsll.
Loop At flat file data.
***To populate Services Data of Entry Sheet(BAPIESLLC)
lExt = lExt + 10.
lLine = lLine + 1.
Clear wEsll.
wEsll-pckg_no = c2.
wEsll-line_no = lLine.
wEsll-ext_line = lExt.
wEsll-outl_level = c0.
wEsll-subpckg_no = c0.
wEsll-quantity = quantity from flat file
wEsll-base_uom = UOM from flat file
wEsll-gr_price = Gross price from flat file
wEsll-pln_pckg = Package from PO
wEsll-pln_line = Package line from PO
wEsll-short_text = Item Short Text from flat file
wEsll-tax_code = Tax code from flat file
Append wEsll To iEsll.
***To populate Account Assignment Data of Entry Sheet(BAPIESKNC)
Clear wEskn.
wEskn-pckg_no = c1.
wEskn-serial_no = c1.
wEskn-network = Network from flat file
wEskn-activity = Activity from flat file
wEskn-gl_account = GL Account from flat file
Append wEskn To iEskn.
Clear wSes1.
EndLoop.
CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
EXPORTING
ENTRYSHEETHEADER = wEssr
TESTRUN = pTest
IMPORTING
ENTRYSHEET = wSnum
TABLES
ENTRYSHEETACCOUNTASSIGNMENT = iEskn
ENTRYSHEETSERVICES = iEsll
ENTRYSHEETSRVACCASSVALUES = iEskl
RETURN = iMsg.
Could anyone please let me know what needs to be done to resolve this.
Thanks
AnilHi,
Thanks a lot for the reply.
Still im not able to clear the error 'Error during update'.
Im passing following parameters to BAPI_ENTRYSHEET_CREATE.
Refresh iEsll.
Refresh iEskn.
***To populate Header Data of Entry Sheet
Clear wEssr.
wEssr-po_number = wSes-ebeln.
wEssr-po_item = wSes-ebelp.
wEssr-short_text = wSes-txz01.
wEssr-location = wSes-dlort.
wEssr-person_int = sy-uname.
wEssr-pckg_no = 1.
wEssr-doc_date = sy-datum.
wEssr-post_date = sy-datum.
wEssr-acceptance = cX.
wEssr-fin_entry = cX.
***To populate Services Data of Entry Sheet
Clear wEsll.
wEsll-pckg_no = 1.
wEsll-line_no = 1.
wEsll-ext_line = 0.
wEsll-outl_level = '0'.
wEsll-outl_no = '1'.
wEsll-outl_ind = cX.
wEsll-subpckg_no = c2.
wEsll-pln_line = 123.
wEsll-short_text = wSes-ktext1.
wEsll-quantity = wSes-menge.
wEsll-base_uom = wSes-meins.
wEsll-gr_price = wSes-tbtwr.
wEsll-tax_code = wSes-mwskz.
Append wEsll To iEsll.
***To populate Account Assignment Data of Entry Sheet
Clear wEskn.
wEskn-pckg_no = '1'.
wEskn-network = wSes-nplnr.
wEskn-activity = wSes-vornr.
wEskn-gl_account = wSes-sakto.
Append wEskn To iEskn.
Could you please let me know where i am doing wrong.
Thanks once again.
Regards,
Vinny -
BAPI_ENTRYSHEET_CREATE returns "No service items selected"
I was wondering if anybody could help. Does anybody have an example using BAPI_ENTRYSHEET_CREATE? I would appreciate it.
Hi Vivek,
You may want to check this include program <b>LMEW5F02</b> and <b>LMLSXF31</b>.
They have implementation for this BAPI.
Hope this will help.
Regards,
Ferry Lianto -
How to get ESLL-SRVPOS field by using ESSR-LBLNI !
Currently I have data for
purchasing document
entry sheet - ESSR-LBLNI
vendor, -
reference,ESSR-XBLNR
purchase org
VAT number -LFA1-STCD1
Now I need data for ESLL-SRVPOS
can any one advice.Thank You. for all the responses.
I got the simple solution to get the SRVPOS- G/L account field by passing the Entry sheet number- LBLNI.
USING function Module :-
BAPI_ENTRYSHEET_GETDETAIL
code for the reference that i have used :-
data l_1 type BAPIESSR-SHEET_NO.
data l_hed type BAPIESSR.
l_1 = wa_sesll-LBLNI.
CALL FUNCTION 'BAPI_ENTRYSHEET_GETDETAIL'
EXPORTING
ENTRYSHEET = l_1
IMPORTING
ENTRYSHEET_HEADER = l_hed
TABLES
ENTRYSHEET_ACCOUNT_ASSIGNMENT = it_esll1
INPUT is here - LBLNI- 1000000058
PCKG_NO
SE
D
PERCEN
ACCASS_VAL
GL_ACCOUNT
1647
1
100,0
11.475,0000
410402
GL-ACCOUNT - 410402- >nothing but my SRVPOS.
plz feel free if any query.
Regards!
SKR... -
Re:How to change the RBKP-BKTXT field after MIRO invoice is saved
Hi ALL
i forgot to fill doc header text for several invoices. Is there any way to edit RBKP-BKTXT field.
Thanks
SteveDaer Anup,
Check the below link where you can capture the current transaction in MIRO.
http://forums.sdn.sap.com/thread.jspa?threadID=1416227&tstart=0
CONSTANTS: c_vorgang(23) TYPE c VALUE '(SAPLMR1M)RM08M-VORGANG'.
FIELD-SYMBOLS: <fs_vorgang> TYPE ANY.
ASSIGN (c_vorgang) TO <fs_vorgang>.
CASE <fs_vorgang>.
WHEN '1'.
WHEN '3'.
WHEN OTHERS.
ENDCASE.
Based on the value of field symbol you can differentiate.
Thanks to Pablo who has given this solution in the above mentioned thread.
The BADI you can use is INVOICE_UPDATE and method AT SAVE .
Regards,
Deepak.
Maybe you are looking for
-
Query Designer in BI - How to cumulate value and get the Max and Min value.
I want to create a report with query designe of BI 7r. is it possible. the data from the cube will be Year , Exposed Quantity 1999 , 200 2000 , 100 2001 , -100 2002 , 300 2003 , - 200
-
Asset Explorer -- Acquisition Value Year-End
Dear all, I'm looking on how to fetch a certain value... If you access transaction AS03 You'll see th master data for a certain asset. Now... if you click on the "Asset value"-button, you'll be redirected to transaction AW01N, "Asset Explorer". In th
-
What happens in SP2013 when a user gets married and changes their name in AD? My understanding is that after a full (?) User Profile import and a People crawl (Full/inc?) - their display name in SharePoint will be updated but in SP2013 do the entrie
-
SAp SCRIPT Multiple lines in MYWINDOW
hello friends, can i print internal table data(Multiple lines) in a window ither than MAIN window? Ex. Loop at itab into wa, call function 'write_form' exporting element = 'MULTIPLE' window = MYWINDOW (VAR). endloop. Please suggest. Thanks, M
-
Help! Can any tell me what cause / remedy is for this error
Can any tell me what cause / remedy is for this error: [1/29/08 10:52:05:009 GMT] 4131a8 SystemOut U 2008-01-29 10:52:05,009 [QuartzWorkerThread-0] FATAL com.scheduler.service.businessservice.ReportExecution () 190470534 - ****** METHOD FAILED ******