Enquiry in bapi
Dear all,
I am calling these 2 bapi's in my program
BAPI_PRODORDCONF_GET_TT_PROP,
BAPI_PRODORD_GET_DETAIL.
Due to this Bapi's report is very slow.
How can I improve the performance of my report?
Regards,
Pooja
Hi Pooja,
I agree to the suggestion given adding to that Check with the individual BAPIs too.
BAPI_PRODORDCONF_GET_TT_PROP :Propose Data for Time Ticket Confirmation
it took nearly 6 lak microsecs.
BAPI_PRODORD_GET_DETAIL: Order detail data
better to check the where list of these BAPIs also will give u hint the required field too
code check with SCI and also have a trace
ST05 .
May help u.
Cheers
Mohinder Singh
Similar Messages
-
BAPI or FM to post incoming payment for transaction F-28?
Hi all,
I am looking for a BAPI or FM to post incoming payment through transaction F-28.
Please guide if someone worked on it.........
Thanks
Suvarnahi,
look all these similar threads and u decide what to do .............
BAPI on Post Incoming Payment (F-28) Enquiry
BDC / Bapi For Post Incoming Payment (F-28)
F-28 -post incoming payment
bapi is used to 'post incoming payments (t-code F-28)'
BAPI or FM for F-28 Transaction
~~Guduri -
BAPI on Post Incoming Payment (F-28) Enquiry
Hi all,
I try to look for BAPI on F-28 and I had search for many info. However, I found that 1 thread saying that we can have 'BAPI_ACC_GL_POSTING_POST' to do.
Refer to this site:
bapi is used to 'post incoming payments (t-code F-28)'
However, I found that the BAPI is used for transaction FB50. Generally, I use the F-28 to post incoming payment for AR. So I am not so sure that the BAPI can work.
Besides that, I found another thread claim that no BAPI for the F-28. Refer to this site:
https://www.sdn.sap.com/irj/sdn/profile?userid=677412
As my research, I cant find the appropriate BAPI. Please give me some idea on how the BAPI work, and any correct BAPI can be used? Frankly, I a bit confused now.
Thanks and regards.
Cheers,
IsaacKindly go through this. I thjink it will clear you.
Pattern in which function modules are called
The function module fi_document_process is called 4 times and finally document_post is called once which updates the tables.
Step 1. Call FI_DOCUMENT_PROCESS
Import Parameters
I_GJAHR LIKE TRWCA- YEAR
I_PROCESS LIKE TRWPR-PROCESS
I_EVENT LIKE TRWPR-EVENT
Tables
T_BKPF LIKE BKPF
T_BSEG LIKE BSEG
T_BSEGZ LIKE BSEGZ
T_ACCIT_EXT LIKE ACCIT_EXTENSION
Values to populate import parameters
i_gjahr = '2007' Fiscal year from the screen
i_process = 'BELEG' Constant, can be hard coded
i_event = 'CRBSEGZ' Constant, can be hard coded
xbkpf-bukrs '1000'. Company code from the screen
xbkpf-belnr '$1'. constant , can be hard coded
xbkpf-gjahr '2007'. Fiscal Year , from the screen
xbkpf-blart 'DZ'. Can be obtained from the invoice document
xbkpf-bldat '20070116'. Document Date, from the screen
xbkpf-budat 20070118'. Posting Date , from the screen
xbkpf-monat '01'. constant , can be hard coded
xbkpf-wwert '20070118'. posting Date
xbkpf-usnam 'SAPUSER'. user name
xbkpf-tcode 'FBZ1'. Constant, can be hard coded
xbkpf-waers 'EUR'. currency, from the screen
xbkpf-glvor 'RFBU'. constant can be hard coded
xbkpf-awtyp 'BKPF'. constant, can be hard coded
xbkpf-fikrs 1000'. customer account number, from the screen
xbkpf-hwaer 'EUR'. Currency, from the screen
xbkpf-awsys 'ECCCLNT800'. can be hard coded
xbseg Record 1
xbseg-bukrs '1000'. Company code from the screen
xbseg-belnr '$1' . constant , can be hard coded
xbseg-gjahr '2007'. Fiscal Year, from the screen
xbseg-buzei 001'. constant , can be hard coded
xbseg-bschl '40'. constant , can be hard coded
xbseg-koart 'S'. constant , can be hard coded
xbseg-shkzg 'S' . constant , can be hard coded
xbseg-dmbtr '10'. Amount, from the screen
xbseg-wrbtr '10'. Amount, from the screen
xbseg-pswbt 10'. Amount, from the screen
xbseg-pswsl 'EUR'. Currency, from the screen
xbseg-valut 20070118'. Posting date, from the screen
xbseg-altkt '0000110100'.
xbseg-vorgn 'RFBU'. constant , can be hard coded
xbseg-fdlev 'B9'. constant , can be hard coded
xbseg-fdwbt '10'. Amount, from the screen
xbseg-fdtag '20070118'. Posting date, from the screen
xbseg-kokrs 1000'. Customer account
xbseg-xkres 'X'. constant , can be hard coded
xbseg-xopvw 'X'. constant , can be hard coded
xbseg-hkont '0000110009'. Bank Account number
xbseg-xbilk 'X'. constant , can be hard coded
xbseg-fipos '9620'. constant , can be hard coded
xbseg-lokkt '0000110009'. Bank Account number
xbseg Record 2.
bseg-bukrs '1000'. Company code from the screen
bseg-belnr. '$1' constant , can be hard coded
bseg-gjahr. '2007' Fiscal year from the screen
bseg-augbl. '*' constant , can be hard coded
bseg-buzei'002'. constant , can be hard coded
bseg-bschl. '15' constant , can be hard coded
bseg-koart. 'D' constant , can be hard coded
bseg-shkzg. 'H' constant , can be hard coded
bseg-dmbtr. '10' Amount, from the screen
bseg-wrbtr. '10' Amount, from the screen
bseg-pswbt. '10' Amount, from the screen
bseg-pswsl. 'EUR' currency, from the screen
bseg-altkt. '0000120100'
bseg-vorgn. 'RFBU' constant , can be hard coded
bseg-kokrs. '1000' Customer account number
bseg-xkres. 'X' constant , can be hard coded
bseg-xopvw. 'X' constant , can be hard coded
bseg-hkont. '0000140000'
bseg-xbilk. 'X' constant , can be hard coded
bseg-fipos. '9620' constant , can be hard coded
bseg-lokkt. '0000140000'
bseg-nebtr. '10' Amount, from the screen
bseg-xauto. 'X' constant , can be hard coded
bseg-xzahl. 'X' constant , can be hard coded
bseg-saknr. '0000140000'
bseg-zfbdt. '20070116' Invoice document date
bseg-hwmet. 'A' constant , can be hard coded
bseg-kkber. '1000' Customer account number
bseg-agzei. '1' constant , can be hard coded
Step 2. Call FI_DOCUMENT_PROCESS
Import Parameters
I_GJAHR LIKE TRWCA- YEAR
I_PROCESS LIKE TRWPR-PROCESS
I_EVENT LIKE TRWPR-EVENT
Tables
T_BKPF LIKE BKPF
T_BSEG LIKE BSEG
T_BSEGZ LIKE BSEGZ
T_AUSZ3 LIKE AUSZ_CLR
T_AUSZ4 LIKE AUSZ_CLR_ASGMT
T_ACCIT_EXT LIKE ACCIT_EXTENSION
Values to populate import parameters
i_gjahr = '2007' Fiscal year from the screen
i_process = 'BELEG' Constant, can be hard coded
i_event = 'CLOSE' Constant, can be hard coded
Table xausz3.
ausz3-agzei. '1' Constant, can be hard coded
ausz3-waers. 'EUR' Currency from the screen
ausz3-bukrs. '1000' Company Code
ausz3-belnr. '1800000076' Document number from the screen
ausz3-gjahr. '2007' Fiscal Year
ausz3-buzei. '001'
ausz3-shkzg. 'S' Constant, can be hard coded
ausz3-dmbtr. '10' Amount, from the screen
ausz3-wrbtr. '10' Amount, from the screen
ausz3-koart. 'D' Constant, can be hard coded
Step 3. Call FI_DOCUMENT_PROCESS
Import Parameters
I_GJAHR LIKE TRWCA- YEAR
I_PROCESS LIKE TRWPR-PROCESS
I_EVENT LIKE TRWPR-EVENT
Tables
T_BKPF LIKE BKPF
T_BSEG LIKE BSEG
T_BSEGZ LIKE BSEGZ
T_AUSZ3 LIKE AUSZ_CLR
T_AUSZ4 LIKE AUSZ_CLR_ASGMT
T_ACCIT_EXT LIKE ACCIT_EXTENSION
Values to populate import parameters
i_gjahr = '2007' Fiscal year from the screen
i_process = 'BELEG' Constant, can be hard coded
i_event = 'PROJECT' Constant, can be hard coded
I_AUGLV = 'EINGZAHL' Constant, can be hard coded
Step 4. Call POST_DOCUMENT
Import Parameters
I_BKDF LIKE BKDF
I_UF05A LIKE UF05A
I_GENER LIKE T020-GENER
I_AUGLV LIKE T041A-AUGLV
Tables
T_AUSZ1 LIKE AUSZ1
T_AUSZ2 LIKE AUSZ2
T_AUSZ3 LIKE AUSZ_CLR
T_AUSZ4 LIKE AUSZ_CLR_ASGMT
T_BKP1 LIKE BKP1
T_BKPF LIKE BKPF
T_BSEC LIKE BSEC
T_BSED LIKE BSED
T_BSEG LIKE BSEG
T_BSET LIKE BSET
T_BSEU LIKE BSEU
Values to populate import parameters
Table xausz1
xausz1-belnr. '1800000076' Document number from the screen
xausz1-bukrs. '1000' Company code from the screen
xausz1-gjahr. '2007' Fiscal year from the screen
xausz1-buzei. '001' Constant , can be hard coded
Table xausz2
ausz2-bukrs. '1000' Company code from the screen
ausz2-aktio. 'A' Constant , can be hard coded
ausz2-augbl. '1400000054' Posted document number..from the function NUMBER_GET_NEXT(Dynamically generated unique number)
ausz2-augdt. '20070118' Posting Date from the screen
ausz2-auggj. '2007' Fiscal Year from the screen
Table xbkpf
First record of the internal table zbkpf has to be modified with the dynamically generated document number.
Xbkpf-belnr. 1400000054
Table xbkp1
xbkp1-currj '2007' Fiscal year, from the screen
Table xbseg
Following fields in the table xbseg has to be modified before passing to this function module.
Record 1
TO wa_bseg1-belnr. '1400000054' Dynamically generated number
TO wa_bseg1-zuonr. '20070116' Document Date from the screen
Record 2
bseg1-belnr. '1400000054' Dynamically generated number
bseg1-augdt. '20070118' Posting date from the screen
bseg1-augcp. '20070118' Posting date from the screen
bseg1-augbl. '1400000054' Dynamically generated number
bseg1-zuonr. '14000000542007' Concatenating dynamically generated number and fiscal year
bseg1-kunnr. '1000' Customer number from the screen
Table Xbseu
Record 1
bseu-waers 'EUR' Currency from the screen
Record 2
bseu-waers. 'EUR' Currency from the screen
bseu-xzver. 'X' Constant Hard coded
Step 5. Call FI_DOCUMENT_PROCESS
Import parameters
I_GJAHR LIKE TRWCA-TOYEAR
I_PROCESS LIKE TRWPR-PROCESS
I_EVENT LIKE TRWPR-EVENT
I_AWTYP LIKE ACCHD-AWTYP
I_AWREF LIKE ACCHD-AWREF
I_AWORG LIKE ACCHD-AWORG
I_AWSYS LIKE ACCHD-AWSYS
Tables
T_BKPF LIKE BKPF
Values to populate import parameters
i_gjahr = '2007' Fiscal Year from the screen
i_process = 'BELEG' Constant
i_event = 'POST' Constant
i_awtyp = 'BKPF' Constant
i_awref = '1400000054'Dynamically generated posting doc number
i_aworg = '10002007' Concatenate comp code and Fiscal Year
i_awsys = 'ECCCLNT800' Constant. -
Using BAPI for Quotations: BAPI_SLSTRANSACT_CREATEMULTI
Hi everyone,
I am working with the BAPI: BAPI_SLSTRANSACT_CREATEMULTI to create an enquiry OR even a quotation. Using t.code SE37, in the following tables I enter:
Header: (2 fields)
Process_Type: ZAG (t.type for enquiry)
Description: description of the enquiry
Partner: (3 fields)
Partner_Fct: (partner function) - e.g. 00000001 (SP)
Partner_No: (partner number) - BP ID
KIND_OF_ENTRY
(Entered 5 partners; 1 that was entered manually (SP) and the other four which are determined auto.)
HENCE in the INPUT FIELD I have 5 BP's
INPUTFIELDS (1 Field)
Fieldname : entered 5 BP's
On execution, the return table shows three errors:
E CRM_ORDER_CUST 004 System error: Incorrect call of read module for table CRMC_OBJECTS!
W CRM_ORDER 003 Object type cannot be processed
A CRM_ORDER 009 Program error: Incorrect values in interface parameters
I entered handle 00000001 for header and 0000002 for the partner and specified the same in the INPUTFIELDS: REF_HANDLE, it leads to more errors
Any solutions please? Deserving points shall be awarded.
Best Regards,
Jacob.
Edited by: Jacob Raj on Mar 14, 2008 1:50 PMHi,
May be following code is useful for you.
******************************Header Data***********************************
DATA: lwa_header TYPE bapibus20001_header_ins,
lwa_input_fields TYPE bapibus20001_input_fields.
lwa_header-handle = '0000000001'.
lwa_header-process_type = lwa_crmd_orderadm_h-process_type.
APPEND lwa_header TO i_header.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'ORDERADM_H'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'PROCESS_TYPE' CHANGING lwa_input_fields
********************************Partner Data********************************
DATA:lwa_partner TYPE bapibus20001_partner_ins,
lwa_input_fields TYPE bapibus20001_input_fields,
lwa_partner-ref_handle = '0000000001'.
lwa_partner-ref_kind = 'A'.
lwa_partner-ref_partner_handle = '0001'.
lwa_partner-kind_of_entry = 'C'.
lwa_partner-partner_fct = '00000001'.
lwa_partner-partner_no = <partner no>.
lwa_partner-no_type = 'BP'.
lwa_partner-display_type = 'BP'.
APPEND lwa_partner TO i_partner.
lwa_partner-ref_partner_handle = '0002'.
lwa_partner-partner_no = <partner no>..
lwa_partner-partner_fct = '00000014'.
APPEND lwa_partner TO i_partner.
lwa_partner-kind_of_entry = 'A'.
lwa_partner-ref_partner_handle = '0003'.
lwa_partner-partner_no = <partner no>.
lwa_partner-partner_fct = '00000012'.
APPEND lwa_partner TO i_partner.
CLEAR lwa_input_fields.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'PARTNER'.
lwa_input_fields-logical_key = '0001'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.
CLEAR lwa_input_fields.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'PARTNER'.
lwa_input_fields-logical_key = '0002'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.
CLEAR lwa_input_fields.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'PARTNER'.
lwa_input_fields-logical_key = '0003'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.
FORM populate_input_field_name USING lv_field_name TYPE string
CHANGING lwa_input_fields TYPE bapibus20001_input_fields.
lwa_input_fields-fieldname = lv_field_name.
APPEND lwa_input_fields TO i_input_fields.
ENDFORM.
***************************CALL BAPI_SLSTRANSACT_CREATEMULTI*********************************
CALL FUNCTION 'ZBAPI_SLSTRANSACT_CREATEMULTI'
TABLES
header = i_header
return = i_return
sales = i_sales
partner = i_partner
input_fields = i_input_fields
created_process = i_created_process
saved_process = i_saved_process
COMMIT WORK.
If helpful kindly reward me.
Thanks & Regards,
Anirban -
BDC Program for Sales order and Enquiry
Hi All,
Pls can you help me.
To create sales order and enquiry I have bapis .
BAPI_SALESORDER_CREATEFROMDAT2
BAPI_INQUIRY_CREATEFROMDATA2
but i want BDC Programs for that bapis
pls can you help me
thanks
marsHi Krishna ,
Please check the below links .
[http://www.sap-basis-abap.com/abap/bapi-sample-to-upload-data-from-flat-file-to-va01.htm]
[http://abapreports.blogspot.com/2008/06/bapi-sample-code-for.html] -- > Select and Copy from this one. -
Open Purchase Order UPload Using the BAPI 's
i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out using the BAIP's for upload the PO, i need sample code for this ........
Thanks & Regards
Raghu
<u>Field Name Field Description Type Length</u>
<b>EBELN Purchasing Document Number CHAR 010 X
BUKRS Company Code CHAR 004 MN10 C
EKORG Purchasing Organization CHAR 004 MN00 C
EKGRP Purchasing group CHAR 003 X
BSART Order type (Purchasing) CHAR 004 X
LIFNR Account Number of Vendor or Creditor CHAR 010 X
BEDAT Purchase Order Date DATS 010 X
ZTERM Terms of payment key CHAR 004 X
WAERS Currency Key CUKY 005 X
INCO1 Incoterms (part 1) CHAR 003 X
INCO2 Incoterms (part 2) CHAR 028 X</b>
EBELP Item Number of Purchasing Document NUMC 005 X
EMATN Material number CHAR 018 X
WERKS Plant CHAR 004 X
LGORT Storage location CHAR 004 X
EPSTP Item category in purchasing document CHAR 001 X
KNTTP Account assignment category CHAR 001 X
EINDT Item delivery date DATS 010 X
MENGE "Purchase order quantity (direct input, transfer of POs)" CHAR 013 X
MEINS Order unit UNIT 003 X
NETPR "Net price: Document currency (direct input, transfer of" CHAR 011 X
PEINH "Price unit (direct input, transfer of POs)" CHAR 005 X
BPRME Order Price Unit (Purchasing) UNIT 003 X
BPUMZ Numerator: Conversion OPUn into OUn (direct input of POs CHAR 005 X
BPUMN Denominator: Conversion OPUn into OUn (direct input of P CHAR 005 X
SAKTO Cost element CHAR 010 X
KOSTL Cost Center CHAR 010 X
VBELN Sales and Distribution Document Number CHAR 010 X
VBELP Sales document item NUMC 006 X
WEMPF Goods recipient CHAR 012 X
WEBTH "Amount in local currency (direct input, transfer of POs)" CHAR 013 X
WEBTF "Amount in document currency (direct input, transfer of P" CHAR 013 X
WEREF Flag for treatment of GR/IR (direct input of POs) CHAR 001 X
SPINF Indicator: Update info record CHAR 001 X
WEPOS Goods Receipt Indicator CHAR 001 X
REPOS Invoice receipt indicator CHAR 001 Xi need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out using the BAIP's for upload the PO, i need sample code for this ........
Thanks & Regards
Raghu
<u>Field Name Field Description Type Length</u>
<b>EBELN Purchasing Document Number CHAR 010 X
BUKRS Company Code CHAR 004 MN10 C
EKORG Purchasing Organization CHAR 004 MN00 C
EKGRP Purchasing group CHAR 003 X
BSART Order type (Purchasing) CHAR 004 X
LIFNR Account Number of Vendor or Creditor CHAR 010 X
BEDAT Purchase Order Date DATS 010 X
ZTERM Terms of payment key CHAR 004 X
WAERS Currency Key CUKY 005 X
INCO1 Incoterms (part 1) CHAR 003 X
INCO2 Incoterms (part 2) CHAR 028 X</b>
EBELP Item Number of Purchasing Document NUMC 005 X
EMATN Material number CHAR 018 X
WERKS Plant CHAR 004 X
LGORT Storage location CHAR 004 X
EPSTP Item category in purchasing document CHAR 001 X
KNTTP Account assignment category CHAR 001 X
EINDT Item delivery date DATS 010 X
MENGE "Purchase order quantity (direct input, transfer of POs)" CHAR 013 X
MEINS Order unit UNIT 003 X
NETPR "Net price: Document currency (direct input, transfer of" CHAR 011 X
PEINH "Price unit (direct input, transfer of POs)" CHAR 005 X
BPRME Order Price Unit (Purchasing) UNIT 003 X
BPUMZ Numerator: Conversion OPUn into OUn (direct input of POs CHAR 005 X
BPUMN Denominator: Conversion OPUn into OUn (direct input of P CHAR 005 X
SAKTO Cost element CHAR 010 X
KOSTL Cost Center CHAR 010 X
VBELN Sales and Distribution Document Number CHAR 010 X
VBELP Sales document item NUMC 006 X
WEMPF Goods recipient CHAR 012 X
WEBTH "Amount in local currency (direct input, transfer of POs)" CHAR 013 X
WEBTF "Amount in document currency (direct input, transfer of P" CHAR 013 X
WEREF Flag for treatment of GR/IR (direct input of POs) CHAR 001 X
SPINF Indicator: Update info record CHAR 001 X
WEPOS Goods Receipt Indicator CHAR 001 X
REPOS Invoice receipt indicator CHAR 001 X -
URGENT: Function modules or BAPIs
Hi Experts,
I need function modules or BAPI to get the open items and cleared items G/L Account wise.
Useful replies will be surely awarded.Hi Chakradhar,
Check tcode : BAPI
u will get all bapis there.
Regards,
Hemant -
Questions on BPS BAPI calls and PDF forms
I will need to create a button on a BPS form and that button is supposed to call a BAPI. One of the buttons will create a PDF of the form (using the contents of the form) and print said form to a 'default' printer. The issue is that not all cFolder users will have an ECC logon name. What am I to do in this instance? Will I need to pass some type of credentials to the ECC backend in order to run this BAPI?
Also, how can I get the contents of the form(s) to the BAPI? I assume that I will need to create the PDF in the code of the BAPI. Please be patient with me as this is my first time to work with cFolders and/or BPS.
Regards,
DavisHi Davis,
Well, if you are able to log on the BPS application (thus, a Web Interface if I'm not mistaken) then it means that some user is logged on the ABAP-side. It is either a "personal" user or a technical (common) user, that is used for anonymous access.
You will certainly be able to track down this user with the SM04 transaction.
You should be able to add a button to the BPS page. One idea would be to call an URL with an ICF service behind that will be able to process the parameters contained in this URL.
It will be this very ICF service that will call the BAPI.
Try these links
http://help.sap.com/saphelp_nw04s/helpdata/en/55/33a83e370cc414e10000000a114084/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ea8db790-0201-0010-af98-de15b6c1ee1a
Hope this helps.
Best regards,
Guillaume -
Deletion of Scheduling Agreement and Delivery Schedule using BAPI
Hi SAP MM Gurus,
Please assist in inquiry below:
My scenario is that I am trying to delete delivery schedules and scheduling lines using BAPIs. I have no issues when there is no GR made yet for the delivery schedules. The error arises when there are already existing Goods Receipts and Invoices for the schedule line that I wish to delete
When using the BAPIs (either BAPI_SAG_CHANGE or BAPI_SCHEDULE_MAINTAIN), I set the deletion indicator to "L" and set to X all change relevant fields (i.e. DELETION_INDX). However, whenever I execute it, I get the error message 06088. The funny thing is both the Quantities and the delivered quantities that are normally populated are left blank.
For example:
Normal error for 06088:
Quantity 100.0 smaller than quantity delivered 179.0
Error using BAPI with deletion indicator:
Quantity smaller than quantity delivered
Is this a bug of the BAPI? or am I just missing some settings?
Your immediate response is appreciated
Regards,
DeLoHi,
Please find the below link check the setting are correct or not
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02cb00a-bfb4-2c10-98aa-e33e7f64ba28?quicklink=index&overridelayout=true
Reagrds,
Pramod -
BAPI for training and event management
Hi all,
I need a bapi that returns the list of the attendees of a training course.
I've seen that a FM exists: RH_GET_PARTICIPANTS and i know how it works.
I would like a standard BAPI to be called by an external system.
If it doesn't exit I will create a remote FM that calls the RH_GET_PARTICIPANTS.
thanks
enzoHi Enzo,
I don't think there is a BAPI.. but you can create one using the Method 'Display Attendance' for the 'Attendance' Business Object (PDRELA_025) in Tcode BAPI. But I think creating an RFC that in turn calls RH_GET_PARTICIPANTS is the easy way out.
Regards,
Suresh Datti -
Hi guys,
While scheduling a BAPI(ZBAPI_WS_REPORT ),am gettin an error msg says Program ZBAPI_WS_REPORT is invalid or does not exist,even though it exists in the target client.What could be the problem?Please help me out in this regard asap.Its very urgent.
Surely points vl b rewarded.
Warm Regards,
Mohandoss P.You need to call that BAPI into your report and then you have schedule that report.
I hope it helps.
Let me know if any doubts.
Thanks,
Vibha
Please mark all the useful answers -
BAPI Error: No account assignment exists for service line 0000000000
I am using BAPI : BAPI_PO_CREATE1 to create a PO.
I am getting this error while creating PO "No account assignment exists for service line 0000000000"
Please help.Yes...
for each item i am creating one parent service record and one child service record with REQUISITION_SERVICES.
the Package no for parent is the subpackage no for child.
also for each item, I fill REQUISITION_ACCOUNT_ASSIGNMENT and REQUISITION_SRV_ACCASS_VALUES
Still I get the Error.
Thanks to help me resolve. -
Need BAPI for MIGO to create a Goods Receipt against PO &Outbound Delivery
Hi Friends,
GRNs (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
If PO Number = EKKO-EBELN GR against Purchase Order
= LIKP-VBELN GR against Outbound Delivery
Based on the above condition I need to create a Goods Receipt.
Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
The fields available are with us are...
Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number SLED
Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
Please provide sample code if possible.
Waiting for replies,
Thanks and Regards,
SudhaHi Friends,
GRNs (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
If PO Number = EKKO-EBELN GR against Purchase Order
= LIKP-VBELN GR against Outbound Delivery
Based on the above condition I need to create a Goods Receipt.
Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
The fields available are with us are...
Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number SLED
Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
Please provide sample code if possible.
Waiting for replies,
Thanks and Regards,
Sudha -
How to change pricing Conditions in Sales order in change sales order bapi
Hi Experts,
How to change pricing Conditions in Sales order in change sales order bapi.
I have used the 2 function modules bapi-changesalesorder and sd salesdocument change, But it is creating the new record , instead of changing the existing one, Could please assist regarding the same
Thanks in Advance .
NLNHI NLN
I have just tried on my system and managed to overwrite the existing price by passing the following parameters.
<b>Import Paramters:</b>
SALESDOCUMENT - Sales Document Number
ORDER_HEADER_INX - UPDATEFLAG as <b>'U'</b>.
LOGIC_SWITCH - Import Structure - Pass 'X' to LOGIC_SWITCH-COND_HANDL.
<b>Tables:</b>
CONDITIONS_IN - ITM_NUMBER,
COND_COUNT, -> Condition counter same as KONV-ZAEHK generally it is <b>'01'</b>
COND_TYPE,
COND_VALUE,
CURRENCY.
CONDITIONS_INX - ITM_NUMBER,
COND_COUNT,
COND_TYPE,
UPDATEFLAG as <b>'U'</b>,
CURRENCY.
Hope i have clarified your query.
Kind Regards
Eswar -
Hello ,
While using the BAPI 'BAPI_MATERIAL_SAVEDATA', to extend material from one plant to another my code is throwing an error 'Currency initial v,current amount 6,000.0000 in MOVING_PR was transferred without a currency'
Enter a material number'
I have incorporated mbew-peinh, even then its throwing the same error.
I snd copy of my code.
report zmm_r018 .
*& Prog to copy n create the existing material using bapi .
tables: t001l, "Storage Locations
mara, "General Material Data
makt, "Material Descriptions
mbew, "Material Valuation
marc, "Plant Data for Material
mltx. "Purchase Order Descriptions
**parameters : new_mat like mara-matnr,
desc like makt-maktx,
*data: ref_mat like mara-matnr.
*data: xmara type mara.
**data: wamatnr like mara-matnr.
data: potext type string."Purchase Order Desc
data : ihead_data type bapimathead,
iclient_data type bapi_mara, "Client Data
iclient_datax type bapi_marax,
imakt like bapi_makt, "Mat Description
iplant_data like bapi_marc, "Plant View
iplant_datax like bapi_marcx,
iltxt type table of bapi_mltx with header line, "Pur Order Text
istoragelocationdata type bapi_mard, "Storage Location
istoragelocationdatax type bapi_mardx,
iaccounting_data like bapi_mbew, "Accounting View
iaccounting_datax like bapi_mbewx,
bapiret like bapiret2,
returnm type table of bapi_matreturn2 with header line.
**Internal Table to hold the records in the text file
types:begin of it,
matnr(18), " Material number
mbrsh(1), " Industry sector
mtart(4), " Material type
werks(4), " Plant
lgort_d(4), "Storage Location
maktx(40), " Material description
meins(3), " Base unit of measure
matkl(9) , " Material group
bismt(18), " Old Material number
spart(2), " Division
gewei(3), " Weight Unit
text1(30), " Purchasr Order Text
text2(30),
text3(30),
text4(30),
text5(30),
text6(30),
dzeinr(22), " Document
ekgrp(3), " Purchasing group
ekwsl(4), " Purchase Value Key
webaz(3), " Goods receipt processing time in days
dismm(2), " MRP Type
minbe(13), "Reorder point
dispo(3), " MRP Controller
disls(2), "Lot size (materials planning)
mabst(13), "Maximum stock level
plifz(3), " Planned delivery time in days
webaz1(3), " Goods receipt processing time in days
fhori(3), "Scheduling Margin Key for Floats
eisbe(13), "Safety stock
mtvfp(2), "Checking Group for Availability Check
lgpbe(10), "Storage Bin
qmatauth(6),"Material Authorization Group for Activities in QM
qmpur(1), " QM in Procurement is Active
qsspur(8), "Control Key for Quality Management in Procurement
bklas(4), " Valuation Class
bwtty_d(1), "Valuation Category
vprsv(1), " Price control indicator
verpr_bapi(23), "Moving average price/periodic unit price
peinh(5), "Price Unit
end of it.
data: it_data type table of it,
wa_data like line of it_data.
*Decalraing flag
data: v_flag value ''.
*DECLARING WORK AREAs TO BE PASSED TO THE FUNCTION MODULE.
data: bapi_head like bapimathead,
bapi_clientdata like bapi_mara,
bapi_clientdatax like bapi_marax,
bapi_plantdata like bapi_marc,
bapi_plantdatax like bapi_marcx,
bapi_storagelocationdata like bapi_mard,
bapi_storagelocationdatax like bapi_mardx,
bapi_salesdata like bapi_mvke,
bapi_salesdatax like bapi_mvkex,
bapi_makt like bapi_makt,
bapi_return like bapiret2.
*INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
data: begin of it_makt occurs 0.
include structure bapi_makt.
data end of it_makt.
data:begin of it_ret occurs 0.
include structure bapiret2.
data end of it_ret.
*INTERNAL TABLE TO HOLD HEADER DATA
data: it_excel type alsmex_tabline occurs 0 with header line.
*SELECTION-SCREEN ELEMENTS
selection-screen begin of block b1 with frame title text-001.
parameter: fname type rlgrap-filename default 'c:\supplies.xls'.
parameters: p_begcol type i default '1' no-display,
p_begrow type i default '2' no-display,
p_endcol type i default '200' no-display,
p_endrow type i default '2500' no-display.
*perform f_get_data.
selection-screen end of block b1.
*DECLARATION OF EXCELAL TABLE
at selection-screen on value-request for fname.
perform f_get_file using fname.
start-of-selection.
perform f_xls_itab using fname
changing it_excel.
perform f_move_data.
perform f_get_data.
perform f_call_bapi.
*& Form F_GET_FILE
text
-->P_FNAME text
<--P_SY_SUBRC text
form f_get_file using p_fname like fname.
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
FIELD_NAME = ' '
STATIC = ' '
MASK = ' '
changing
file_name = p_fname
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
if sy-subrc <> 0.
message e006(zhnc).
endif.
endform. " F_GET_FILE
*& Form F_XLS_ITAB
text
-->P_FNAME text
<--P_IT_EXCEL text
form f_xls_itab using p_fname
changing p_it_excel.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = 'c:\supplies.xls'
i_begin_col = p_begcol
i_begin_row = p_begrow
i_end_col = p_endcol
i_end_row = p_endrow
tables
intern = it_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " F_XLS_ITAB
*& Form F_MOVE_DATA
text
--> p1 text
<-- p2 text
form f_move_data .
data : lv_index type i.
field-symbols <fs>.
*--- Sorting the internal table
sort it_excel by row col.
clear it_excel.
loop at it_excel.
move it_excel-col to lv_index.
*--- Assigning the each record to an internal table row
assign component lv_index of structure wa_data to <fs>.
*--- Asigning the field value to a field symbol
move it_excel-value to <fs>.
at end of row.
append wa_data to it_data.
clear wa_data.
endat.
endloop.
endform. " F_MOVE_DATA
form f_get_data .
loop at it_data into wa_data.
move-corresponding wa_data to ihead_data.
Header
ihead_data-material = wa_data-matnr.
ihead_data-ind_sector = wa_data-mbrsh.
ihead_data-matl_type = wa_data-mtart.
ihead_data-basic_view = 'X'.
ihead_data-purchase_view = 'X'.
ihead_data-mrp_view = 'X'.
ihead_data-storage_view = 'X'.
ihead_data-quality_view = 'X'.
ihead_data-account_view = 'X'.
move-corresponding wa_data to iclient_data.
Material Description
refresh it_makt.
it_makt-langu = 'EN'.
it_makt-matl_desc = wa_data-maktx.
append it_makt.
Purchase Order Description
clear:iltxt,iltxt[].
concatenate wa_data-text1 wa_data-text2 wa_data-text3 wa_data-text4
wa_data-text5 wa_data-text6 into potext
separated by space.
iltxt-applobject = 'MATERIAL'.
iltxt-text_name = wa_data-matnr.
iltxt-text_id = 'BEST'.
iltxt-langu = sy-langu.
iltxt-langu_iso = 'EN'.
iltxt-format_col = space.
iltxt-text_line = potext.
append iltxt.
Client Data - Basic
iclient_data-matl_group = wa_data-matkl.
iclient_data-old_mat_no = wa_data-bismt.
iclient_data-base_uom = wa_data-meins.
iclient_data-document = wa_data-dzeinr.
iclient_data-unit_of_wt = wa_data-gewei.
iclient_data-division = wa_data-spart.
iclient_data-qm_procmnt = wa_data-qmpur.
iclient_data-pur_valkey = wa_data-ekwsl.
iclient_datax-matl_group = 'X'.
iclient_datax-old_mat_no = 'X'.
iclient_datax-base_uom = 'X'.
iclient_datax-po_unit = 'X'.
iclient_datax-document = 'X'.
iclient_datax-unit_of_wt = 'X'.
iclient_datax-division = 'X'.
iclient_datax-var_ord_un = 'X'.
iclient_data-pur_valkey = 'X'.
move-corresponding wa_data to iplant_data.
Plant - Purchasing
iplant_data-plant = wa_data-werks.
iplant_data-pur_group = wa_data-ekgrp.
iplant_data-gr_pr_time = wa_data-webaz.
iplant_datax-plant = wa_data-werks.
iplant_data-pur_group = 'X'.
iplant_datax-gr_pr_time = 'X'.
*MRP1 View
iplant_data-mrp_type = wa_data-dismm.
iplant_data-reorder_pt = wa_data-minbe.
iplant_data-mrp_ctrler = wa_data-dispo.
iplant_data-lotsizekey = wa_data-disls.
iplant_data-max_stock = wa_data-mabst .
iplant_datax-mrp_type = 'X'.
iplant_datax-reorder_pt = 'X'.
iplant_datax-mrp_ctrler = 'X'.
iplant_datax-lotsizekey = 'X'.
iplant_datax-max_stock = 'X'.
*MRP2 View
iplant_data-plnd_delry = wa_data-plifz.
iplant_data-sm_key = wa_data-fhori.
iplant_data-ctrl_key = wa_data-qsspur.
iplant_data-availcheck = wa_data-mtvfp.
iplant_datax-plnd_delry = 'X'.
iplant_datax-sm_key = 'X'.
iplant_data-ctrl_key = 'X'.
iplant_datax-availcheck = 'X'.
*MRP3 View
iplant_data-safety_stk = wa_data-eisbe.
iplant_data-qm_authgrp = wa_data-qmatauth.
iplant_datax-safety_stk = 'X'.
iplant_data-qm_authgrp = 'X'.
move-corresponding wa_data to istoragelocationdata.
Storage View
istoragelocationdata-plant = wa_data-werks.
istoragelocationdata-stge_loc = wa_data-lgort_d.
istoragelocationdata-stge_bin = wa_data-lgpbe.
istoragelocationdatax-plant = wa_data-werks.
istoragelocationdatax-stge_loc = wa_data-lgort_d.
istoragelocationdatax-stge_bin = 'X'.
Accounting
iaccounting_data-val_area = wa_data-werks.
iaccounting_data-price_ctrl = wa_data-vprsv.
iaccounting_data-moving_pr = wa_data-verpr_bapi.
iaccounting_data-price_unit = wa_data-peinh.
iaccounting_data-val_class = wa_data-bklas.
iaccounting_data-val_cat = wa_data-bwtty_d.
iaccounting_datax-val_area = wa_data-werks.
iaccounting_datax-price_ctrl = 'X'.
iaccounting_datax-moving_pr = 'X'.
iaccounting_datax-price_unit = 'X'.
iaccounting_datax-val_class = 'X'.
iaccounting_datax-val_cat = 'X'.
clear it_ret.
refresh it_ret.
perform f_call_bapi.
read table it_ret with key type = 'S'.
if sy-subrc eq 0.
perform f_bapi_commit.
write:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',
wa_data-matnr.
else.
*message e000(zhnc) with 'ERROR IN CREATING THE MATERIAL'.
*WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
*PERFORM F_DOWNLOAD.
endif.
*ENDIF.
endloop.
endform. " F_GET_DATA
*& Form F_CALL_BAPI
text
--> p1 text
<-- p2 text
form f_call_bapi .
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = ihead_data
clientdata = iclient_data
clientdatax = iclient_datax
plantdata = iplant_data
plantdatax = iplant_datax
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
storagelocationdata = istoragelocationdata
storagelocationdatax = istoragelocationdatax
valuationdata = iaccounting_data
valuationdatax = iaccounting_datax
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA = istoragelocationdata
STORAGETYPEDATAX = istoragelocationdatax
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
NO_DEQUEUE = ' '
NO_ROLLBACK_WORK = ' '
importing
return = it_ret
tables
materialdescription = it_makt
UNITSOFMEASURE = it_uom
UNITSOFMEASUREX = it_uomx
INTERNATIONALARTNOS =
materiallongtext = iltxt
TAXCLASSIFICATIONS =
returnmessages = returnm.
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
append it_ret.
write: it_ret-message .
endform. " F_CALL_BAPI
*& Form F_BAPI_COMMIT
text
--> p1 text
<-- p2 text
form f_bapi_commit .
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
endform. " F_BAPI_COMMIT
Plz suggest some solution.
Best Regards,
RaviHi,
Insert Material number in the MAKT(Material Description table).
Also, check if the material number is missing somewhere else...
Regards,
Kunjal
Maybe you are looking for
-
Mavericks upgrade deleted all my emails
I'm having huge problems with my email account and with soem otehr feature since i upgraded to Mavericks.... Others sharing teh same problems? Also, I tried to contact apple via chat but option is not given to me now that I am travelling trough Asia
-
Hi Experts have you worked with ERP 6.0 and SEM BCS into the ERP? in ERP 6.0 all SEM components like BCS, BPS, CPM are in the same system as "add on" or I dont Know, is posible to work with this componentes from ERP? I think is necessary install SEM
-
Purchasing Outline Agreement Contracts - Condition values
Experts, My requirement is to get historical condition values from contracts ME33k. I am able to get PB00 condition value from A016, KONH and KONP. Like PB00, there are other conditions defined in contract (example: Frieght, Discount etc). From which
-
How do i save audio books to a file then delete from phone
How do I save an audio book to file then delete from my Iphone.
-
Installed Elements 10 today. When browsing for a destination folder for very first project a "Serious Error" message box is displayed and program forced to shut down. What is this and how do I fix??