BAPI_INSPLOT_GETLIST i used this BAPI in my WF
Hi,
In wf this FM is not retrieving the data.I used a standard Method GETLIST.
I bind it properly.No errors.But the values are not coming in to my inbox after i execute the my wf.
I did not use any Event.
Where is the problem.What can i do to get the data from this BAPI.
Regards,
Soni
Hi,
The BAPI looks like it returns the results in the form of a table. Make sure the table elements are bound properly. Also while displaying them either in the workitem text or the mail text, once you put in the container element there is a pop up which asks you about the display of data. Make sure you have the right option of display all the lines in the table, checked.
Hope this helps,
Sudhi
Similar Messages
-
HELP : BAPI_BUS1077_CREATE ( facing problem in using this Bapi )
Hi
I am facing a problem in using this Bapi.
I already have a Data record for the Property Say FAT under a property tree say XXYYZZ. Suppose I want to create a new value for one of its Characteristic of the existing record, I am able to do that. For example. Suppose FAT has a Characteristic called Min = 1 , Max = ' ' , I am able to create a value for this say Max = 5.. at the same time i am able to change the value of Min = 2 if I use the Bapi_Bus1077_Change..
But my problem comes when I am trying to create a new records for the FAT. with Min = 6 and Max = 10.. ( I am creating a new instance ).
I see in the documentation that something has to be done with the Primarykey and Foreighkey. But when I look into my import parameter table, all have the 000000000000000 in my primary key and in foreignkey..
Can someone help me out?
Thanks.
David
Message was edited by:
Kirubakaran DavidAs you want to create a new instant, you need to pass PROP_VAL and PROP_DATA
First call GetDetails and then use it as follows.
prop_val-function = '009'. "NEW
prop_val-primarykey = '000000000000001'. "Temporary key that you need to assign
prop_val-flgprimkey = 'X'. "As the key does not exist
prop_val-foreignkey = prop_header-record_no. "From GetDetail
prop_val-flgfrgnkey = ' '. "As key exists
APPEND prop_val.
prop_data-function = '009'. "NEW
prop_data-primarykey = ''000000000000002'. "Temporary key that you need to assign
prop_data-flgprimkey = 'X'. "As the key does not exist
prop_data-foreignkey = prop_val-primarykey. "This is the value assigned above
prop_data-flgfrgnkey = 'X'. "As the key does not exist
prop_data-name_char = 'MIN_CHAR'.
prop_data-char_value = '6'.
APPEND prop_data.
prop_data-function = '009'. "NEW
prop_data-primarykey = ''000000000000003'. "Temporary key that you need to assign
prop_data-flgprimkey = 'X'. "As the key does not exist
prop_data-foreignkey = prop_val-primarykey. "This is the value assigned above
prop_data-flgfrgnkey = 'X'. "As the key does not exist
prop_data-name_char = 'MAX_CHAR'.
prop_data-char_value = '10'.
APPEND prop_data.
CALL FUNCTION 'BAPI_BUS1077_CREATE'
Note how primary key from PROP_VAL (000000000000001) is used as foreign key for PROP_DATA (000000000000002 and 000000000000003) -
How can i use this BAPI (BAPI_SYSTEM_MS_GETLIST)
HI Experts ,
i am working on ccms Mointoring to fetch data to third party .Trying to get some values from BAPI (BAPI_SYSTEM_MS_GETLIST ) i have provided External User name = 'xxxxxxx'. i am getting an error saying that Not logged on to Interface XAL .Can anyone provide me guide line how to use it this BAPI?Hi,
check for all this parameter.
Short Description: Reads all saved monitor sets
BAPI Object :SystemMonitorSet
BAPI Method :GetList
Function
You can determine the names of all existing monitor sets using this method. Using these names, you can then determine the names of the monitors that exist in each of the sets.
Parameters (Import)
EXTERNAL_USER_NAME
Name of the user in the external system that initiated the method call
Parameters (Export)
MONITOR_SETS
Table with the names of the existing monitor sets (Structure BAPIMSNAME, that consists of only the component NAME)
RETURN
Structure BAPIRET2 with the return values from the method call
Exceptions
MSG_EXT_USER_MISSING MSG_CANT_LOG MSG_NOT_LOGGED_ON MSG_NO_MONITOR_SETS_FOUND MSG_UNKNOWN_PROBLEM
RFC Interface
function BAPI_SYSTEM_MS_GETLIST
importing
EXTERNAL_USER_NAMElikeBAPIXMLOGR-EXTUSERtypeRFC_CHARlength16
exporting
RETURNstructureBAPIRET2length552numberoffields14
tables
MONITOR_SETSstructureBAPIMSNAMElength60numberoffields1
exceptions
Check your monitor sets. -
How can I use this BAPI..Please see
Hello,
Can I simply call the BAPI -> BAPI_SALESORDER_CHANGE to change the date of delivery in a sales order.. how to I call the BAPI if what is want is this:
All the items' delivery date should be postponed by 1 day. ie all change to the next day date.
I think I have chosen the right bapi but how do I code to get this task done?
Thanks,
Charles.Use the Pattern in ABAP Editor to call this BAPI. Populate the necessary data with proper update flags and you are done.
Cheers.
A -
How do I post an Invoice with 'on hold' status using this BAPI?
Hey everyone,
Okay, I'm working on an interface that will take Incoming Invoice information we receive from vendors and post it into the SAP system. I'm still relatively new to ABAP, so it's a little slow-going for me...
The BAPI is IncomingInvoice. What we want to do is try to post the Incoming Invoice using the CreateFromData method. That part, I'm clear on. However, if there are any problems, the client wants us to post it with a status of 'on hold.'
I'm been doing a lot of searching and a lot of BAPI documentation reading, but I'm not finding the answer. I thought at first I could use the Change method, but it looks like I have to have an Invoice already out there in a particular status. So if the CreateFromData somehow fails and doesn't really post an Invoice, then I think using the Change method is pointless.
I thought the answer was to use the PreliminaryPostSingle method, as the documentation states that "enables you to post provisional invoice documents. Provisional invoice documents have the status 'on hold', 'on hold (from parking)', 'parked', 'parked as complete' or 'parked and released'." But here's the kicker -- it expects IMPORT parameters of the INVOICEDOCNUMBER and FISCALYEAR. But I don't have those yet, right? Why does the method tell me it can post documents with this kind of status, but it expects me to provide key fields to an Invoice that doesn't yet exist, doesn't have a field that lets me set the status, and only returns the standard "return" table?
I'm pulling my hair out on this one, guys. I'm really hoping someone out there can help out. As always, helpful posts will be duly rewarded with points. Thanks everyone!Vyerah, sorry for the delay in the reply, but we only recently decided how to approach this. Due to further discussions about the criteria, it was decided that we wouldn't worry about the "on hold" -- if we try to post an Incoming Invoice and it fails, then it'll be reported as such in an output file.
Certainly made my life easier, as I thought I was going to have to clone the BAPI and try to get it so that it posted with an "on hold" status. I'm very, very surprised to see that, apparently, SAP doesn't provide a function or BAPI to allow you to post an Invoice as "on hold." Oh well.
Anyway, I wanted to give you the update. Thanks again! -
Anyone use this FM BAPI_SLSTRANSACT_CHANGEMULTI ????
hello everyone,
I hav a problem that I want to update a status field in service order in SAP CRM.
and I am using this BAPI (BAPI_SLSTRANSACT_CHANGEMULTI). but this is not updating the status of service order.Anyone knows the procedure for that.Plz help me out. I shall be very thankful for that.
HemlataHi all,
I have the same problem with BAPI BAPI_SLSTRANSACT_CHANGEMULTI to manage the text in the sales order.
I need to understand where is the problem? If I'm missing something.
Regards, Roberto -
BAPI_SALESORDER_CREATEFROMDAT1 - using this to create Sales orders in R3
Hi
Does anyone out there - know the limitations of using this BAPI BAPI_SALESORDER_CREATEFROMDAT1 to create sales orders in R3 system - from a functional standpoint ? i.e any known issues - in terms of not being able to pass - all aspects of sales order data using the BAPI , any onscreen validations being done in VA01/VA02 not being done in the BAPI etc.
Can this BAPI be used for sales order create/change ? Or is there any other BAPI out there that is better suited and more well rounded for sales order creation in R3 ?REPORT z_bapi_create_sales_order_test .
* Order header:
* - Order type: OR Important you must use the german code TA
* - Sales org: 1000
* - Distrb. chan.: 10
* - Division: 00
* - Sold to party: 1032
* - Ship to party: 1032
* - Purch order: DG-19970626-3
* Order item:
* - Material: P-100
* - Qty: 1
DATA:
* Order partners
li_order_partners TYPE STANDARD TABLE OF bapiparnr,
l_order_partners LIKE bapiparnr,
* Structures for order header
l_order_header_in LIKE bapisdhd1,
l_order_header_inx LIKE bapisdhd1x,
* Tables for order items
li_order_items_in TYPE STANDARD TABLE OF bapisditm,
l_order_items_in LIKE bapisditm,
li_order_items_inx TYPE STANDARD TABLE OF bapisditmx,
l_order_items_inx LIKE bapisditmx,
* Return table from bapi call
li_return TYPE STANDARD TABLE OF bapiret2,
l_return TYPE bapiret2,
* Sales document number
l_vbeln LIKE bapivbeln-vbeln,
* Error flag
l_errflag(1) TYPE c.
START-OF-SELECTION.
* Build partner information
CLEAR l_order_partners.
l_order_partners-partn_role = 'AG'. "Remember German codes !
l_order_partners-partn_numb = '0000001032'.
APPEND l_order_partners TO li_order_partners.
* Build order header
* Update flag
l_order_header_inx-updateflag = 'I'.
* Sales document type
l_order_header_in-doc_type = 'TA'. "Remember German codes !
l_order_header_inx-doc_type = 'X'.
* Sales organization
l_order_header_in-sales_org = '1000'.
l_order_header_inx-sales_org = 'X'.
* Distribution channel
l_order_header_in-distr_chan = '10'.
l_order_header_inx-distr_chan = 'X'.
* Division
l_order_header_in-division = '00'.
l_order_header_inx-division = 'X'.
* Purchase order
l_order_header_in-purch_no_c = 'DG-19970626-300'.
l_order_header_inx-purch_no_c = 'X'.
* Build order item(s) - Only 1 is used in this example
l_order_items_in-itm_number = '10'.
l_order_items_inx-itm_number = '10'.
l_order_items_in-material = 'P-100'.
l_order_items_inx-material = 'X'.
l_order_items_in-comp_quant = '1.000'.
l_order_items_inx-comp_quant = 'X'.
APPEND l_order_items_in TO li_order_items_in.
l_order_items_inx-updateflag = 'I'.
APPEND l_order_items_inx TO li_order_items_inx.
* CALL Bapi
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = l_order_header_in
order_header_inx = l_order_header_inx
testrun = 'X'
IMPORTING
salesdocument = l_vbeln
TABLES
return = li_return
order_items_in = li_order_items_in
order_items_inx = li_order_items_inx
order_partners = li_order_partners.
END-OF-SELECTION.
* Check and write Return table
CLEAR l_errflag.
WRITE: / 'Sales dcoument: ', l_vbeln.
LOOP AT li_return INTO l_return.
WRITE: / l_return-type, l_return-message(50).
IF l_return-type = 'E'.
l_errflag = 'X'.
ENDIF.
ENDLOOP.
* No errors - Commit
IF l_errflag IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF. -
Material Master workflow - how to use a BAPI?
Hi,
I need some help with a material master workflow.
My requirement is to automate some changes to the material master as steps in the workflow, they are:
Set the Cross plant material status
Set the material deletion flag
I see that the BAPI SAVEDATA is available as a method of BOR BUS1001006. I have created a task with this method but I cannot work out how to automate the changes to the material in the workflow using it?
Has anyone used this BAPI method in a workflow before, how do I automate the changes to the material using it? or is there another way to make changes to the material as a background step in my workflow?
Many thanks,
NeilAll,
thanks ever so much for all your input... I have fixed the problem and it was obscure!
Firstly my binding was wrong... I should not have bound the clientdata and the clientdatax
since the settings I was trying to default (material status an del flag) from the master task were actually being overwritten with this binding. bit of a schoolboy error that one.
Secondly I created 1 brand new task and reused 1 old task for the purposes of setting the material status and the deletion flag respectively.
I managed to get the first one working this morning by removing the binding, the second one still errored with the message about source and target structures being different... which got me thinking, so I created a brand new task for setting the deletion flag and ... it worked!
So why? ... then I realised.
We just upgraded to EHP7 and this workflow existed prior to EHP7. I copied the workflow and edited it for my new business requirements. Reading some of the release notes it turns out the structures have changed and there were conversion routines for fixing them.
All sorted now! -
Updating the WBS Summarization Charactaristics (PSMERK) in PS using a BAPI
Hi there
I would really appreciate any help in this matter, as the issue is becoming critical.
I am trying to update the Summarization fields of the Top Level WBS elements. The Summarization fields are created in Customer Include CI_PSMERK, in table PSMERK.
From the SAP documentation I have found that it is possible to change the WBS values (In table PRPS) using BAPI_BUS2054_CHANGE_MULTI. You can also activate the summarization fields tab using this BAPI.
Does anyone know of a way in which you can programmatically change the Summarization values using a BAPI?
Any help would be greatly appreciated, and points will be awarded.
Regards,
Johan Kriek.Not sure if FM- PS_SUMM_EXIT_PSMERK would be of help.
Check the source code comments of this FM, it might provide some leads.
Also refer note 313899.
Regards
Sreenivas -
As far as I know this two bapi used to create accounting document. But how do we use them ? and what's the different between them?
The most important thing is in what condition we use which bapi to post accounting doc?
Such as there is one requirement to post accounting doc though t-code F-02 in BDC, but how do I know whether I can use this two bapi to replace the BDC?
BAPI_ACC_DOCUMENT_POST
BAPI_ACC_GL_POSTING_POSTHello,
how we use BAPI_ACC_DOCUMENT_POST:
gs_documentheader-ref_doc_no = .... your document number (from number range)
gs_documentheader-bus_act = 'RFBU'.
gs_documentheader-username = sy-uname.
gs_documentheader-header_txt = .... your header text
gs_documentheader-comp_code = '0001'.
gs_documentheader-doc_date = ..... date
gs_documentheader-pstng_date = .... date
gs_documentheader-fisc_year =.... year
gs_documentheader-fis_period = .... period
gs_documentheader-doc_type = 'BS'.
loop at ... items ... assigning <belpos_line>.
gs_accountgl-itemno_acc = <belpos_line>-posnr. "10 digits !
gs_accountgl-bus_area = ... your business area
gs_accountgl-tax_code = <belpos_line>-tax_code.
gs_accountgl-gl_account = <belpos_line>-gl_account.
gs_accountgl-comp_code = ... your company code.
gs_accountgl-alloc_nmbr = ... some identity number
gs_accountgl-item_text = .... item text
gs_accountgl-costcenter = <belpos_line>-kostl.
gs_accountgl-plant = .... werks
append gs_accountgl to gt_accountgl.
gs_currencyamount-itemno_acc = <belpos_line>-posnr.
gs_currencyamount-currency = ... waers
gs_currencyamount-amt_doccur = .... waers
append gs_currencyamount to gt_currencyamount.
endloop.
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
documentheader = gs_documentheader
importing
obj_type = gd_obj_type
obj_key = gd_obj_key
obj_sys = gd_obj_sys
tables
accountgl = gt_accountgl
currencyamount = gt_currencyamount
return = gt_return.
Regards -
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 -
Need to upload mass excel sheet using the bapi bapi_acc_document_post.
I am assigned with an object, where I need to post the records from a mass excel sheet in to ECC or/and BW basing the dimensions using the bapi bapi_acc_document_post.the excel sheet has header and Item data. I am pretty much new to this bapi's
please do the need fulCheck report "ACC_BAPI_TEST_INVOICE_RECEIPT",
this report calls BAPI "BAPI_ACC_INVOICE_RECEIPT_POST",
but the parameters are nearly the same.
Best Regards, Dirk -
Create a Purchase order using the BAPI using the data in the XML file.
Hello Gurus,
here is the scenario can anyone help me how to proceed explaining the procedure?
Create a Purchase order using the BAPI using the data in the XML file.
comprehensive explanations are appreciated.
thanks in advance.hi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM). -
Need Help ! PO using a BAPI - BAPI_PO_CREATE1
Hi friends,
Need some help. I am trying to create a PO using a BAPI - BAPI_PO_CREATE1
<i><b>I want the new PO to have all the characteristics of an existing PO. which is stored in wa_order_split_create-docnr and for the new PO, i want the quantity from wa_order_split_create-qty_acptd and the delivery data to be wa_order_split_create-dly_date. But this process and code below gives a short dump in the std FM - MEPO_DOC_ITEM_GET . It raises an exception of failure.</b></i>
Am i making any mistake while filling the header or item or schedule lines before BAPI_PO_CREATE1 ?
MOVE: wa_order_split_create-docnr TO i_ebeln,
wa_order_split_create-docitm TO i_ebelp .
CALL FUNCTION 'ME_EKKO_SINGLE_READ'
EXPORTING
pi_ebeln = i_ebeln
IMPORTING
po_ekko = i_ekko
EXCEPTIONS
no_records_found = 1
OTHERS = 2.
IF sy-subrc <> 0 .
ENDIF .
Fill PO Header
i_bpoh-comp_code = i_ekko-bukrs .
i_bpoh-doc_type = i_ekko-bsart .
i_bpoh-vendor = i_ekko-lifnr .
i_bpoh-langu = i_ekko-spras .
i_bpoh-pmnttrms = i_ekko-zterm .
i_bpoh-purch_org = i_ekko-ekorg .
i_bpoh-pur_group = i_ekko-ekgrp .
i_bpoh-currency = i_ekko-waers .
i_bpoh-agreement = i_ekko-konnr .
i_bpoh-incoterms1 = i_ekko-inco1 .
i_bpoh-incoterms2 = i_ekko-inco2 .
Fill PO update indicator 'X'
i_bpohx-comp_code = c_char_x .
i_bpohx-doc_type = c_char_x .
i_bpohx-vendor = c_char_x .
i_bpohx-langu = c_char_x .
i_bpohx-pmnttrms = c_char_x .
i_bpohx-purch_org = c_char_x .
i_bpohx-pur_group = c_char_x .
i_bpohx-currency = c_char_x .
i_bpohx-agreement = c_char_x .
i_bpohx-incoterms1 = c_char_x .
i_bpohx-incoterms2 = c_char_x .
CALL FUNCTION 'ME_EKPO_SINGLE_READ'
EXPORTING
pi_ebeln = i_ebeln
pi_ebelp = i_ebelp
IMPORTING
po_ekpo = i_ekpo
EXCEPTIONS
no_records_found = 1
OTHERS = 2.
IF sy-subrc <> 0 .
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF .
Fill PO Item
i_wa_bpoi-po_item = i_ekpo-ebelp .
i_wa_bpoi-material = i_ekpo-matnr .
i_wa_bpoi-plant = i_ekpo-werks .
i_wa_bpoi-stge_loc = i_ekpo-lgort .
i_wa_bpoi-quantity = wa_order_split_create-qty_acptd .
i_wa_bpoi-po_unit = i_ekpo-meins .
i_wa_bpoi-tax_code = i_ekpo-mwskz .
i_wa_bpoi-val_type = i_ekpo-bwtar .
i_wa_bpoi-item_cat = i_ekpo-pstyp .
i_wa_bpoi-acctasscat = i_ekpo-knttp .
i_wa_bpoi-agreement = i_ekpo-konnr .
i_wa_bpoi-agmt_item = i_ekpo-ktpnr .
APPEND i_wa_bpoi TO i_bpoi .
Fill PO Item update indicator 'X'
i_wa_bpoix-po_item = i_ekpo-ebelp .
i_wa_bpoix-po_itemx = c_char_x .
i_wa_bpoix-material = c_char_x .
i_wa_bpoix-plant = c_char_x .
i_wa_bpoix-stge_loc = c_char_x .
i_wa_bpoix-quantity = c_char_x .
i_wa_bpoix-po_unit = c_char_x .
i_wa_bpoix-tax_code = c_char_x .
i_wa_bpoix-val_type = c_char_x .
i_wa_bpoix-item_cat = c_char_x .
i_wa_bpoix-acctasscat = c_char_x .
i_wa_bpoix-agreement = c_char_x .
i_wa_bpoix-agmt_item = c_char_x .
APPEND i_wa_bpoix TO i_bpoix .
Fill PO Item Schedule
i_wa_bpos-po_item = i_ekpo-ebelp .
i_wa_bpos-sched_line = '0001' .
i_wa_bpos-delivery_date = wa_order_split_create-dly_date .
i_wa_bpos-quantity = wa_order_split_create-qty_acptd .
APPEND i_wa_bpos TO i_bpos .
Fill PO Item schedule update indicator 'X'
i_wa_bposx-po_item = i_ekpo-ebelp .
i_wa_bposx-sched_line = '0001' .
i_wa_bposx-delivery_date = c_char_x .
i_wa_bposx-quantity = c_char_x .
APPEND i_wa_bposx TO i_bposx .
CLEAR: i_pargr .
SELECT SINGLE pargr
INTO i_pargr
FROM t161
WHERE bstyp = i_ekko-bstyp
AND bsart = i_ekko-bsart .
CLEAR i_ekpa[].
CALL FUNCTION 'MM_READ_PARTNERS'
EXPORTING
application = c_char_p
ebeln = i_ebeln
bstyp = i_ekko-bstyp
pargr = i_pargr
TABLES
x_ekpa = i_ekpa[].
LOOP AT i_ekpa INTO i_wa_ekpa .
i_wa_bpop-partnerdesc = i_wa_ekpa-parvw .
i_wa_bpop-langu = sy-langu .
IF NOT i_wa_ekpa-lifn2 IS INITIAL .
i_wa_bpop-buspartno = i_wa_ekpa-lifn2 .
ELSE .
i_wa_bpop-buspartno = i_wa_ekpa-parnr .
ENDIF .
APPEND i_wa_bpop TO i_bpop .
CLEAR: i_wa_ekpa, i_wa_bpop .
ENDLOOP .
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = i_bpoh
poheaderx = i_bpohx
IMPORTING
exppurchaseorder = i_new_ebeln
TABLES
return = i_bapiret2
poitem = i_bpoi[]
poitemx = i_bpoix[]
poschedule = i_bpos[]
poschedulex = i_bposx[].
i_order = i_new_ebeln .
SHIFT i_order LEFT DELETING LEADING '0' .
i_return-errortype = c_char_i .
i_return-workarea = c_zsw .
i_return-message = '064' .
i_return-variable1 = i_order .
loop at i_bapiret2 into i_bapiretn where type ca 'EAX' .
append i_bapiretn to t_bapi_return .
endloop .
if t_bapi_return[] is initial .
i_create_order = c_char_x .
CALL FUNCTION 'SWD_POPUP_MESSAGE_SEND'
EXPORTING
act_return = i_return.Hi,
Make the required settings to trigger an idoc during the creation of a PO in Me21N with multiple line items, check how the idoc is being created, This should be starting point to know how to create idoc with multiple line items.
Hope this works for you.
Rajeev -
How to get custom field value in vbkd table using "SD_SALESDOCUMENT_CREATE" bapi
Hi Experts,
Need your help . In one program Iam using SD_SALESDOCUMENT_CREATE bapi .
i/p for my report is am excel.
excel is having below formatt.
To create salesdoc we are using SD_SALESDOC_CREATE bapi.
but After execution of the program we are unable to find the ZZFV_SBCNT (which is custom field) in VBKD w.r.t salesdocument.
Need your help what we need to do to reflect the value in vbkd table.
Here temp will contains the data from excel
1)
FORM f_move_header_data .
wg_header-doc_type = wg_temp-auart . "Order type
wg_header-sales_org = wg_temp-vkorg . "Sales Organization
wg_header-distr_chan = wg_temp-vtweg . "Distribution Channel
wg_header-division = wg_temp-spart. "Division
wg_header-sales_off = wg_temp-vkbur . "Sales Office
wg_header-sales_grp = wg_temp-vkgrp . "Sales Group
wg_header-purch_no_c = wg_temp-bstnk . "Customer purchase order number
wg_header-pymt_meth = wg_temp-zlsch . "Payment Method
wg_header-zzychan_role = wg_temp-zzychan_role_i. "Channel Role
wg_header-zzysub_role = wg_temp-zzysub_role . "Submitter Role
wg_header-zzy_inv_for_opt = wg_temp-zzinv_format . "Invoice Format Optio
wg_header-ord_reason = wg_temp-augru . "Order Reason Code
wg_header-bill_block = wg_temp-faksp. "Billing Block
wg_headerx-doc_type = c_set . "Order type
wg_headerx-sales_org = c_set . "Sales Organization
wg_headerx-distr_chan = c_set . "Distribution Channel
wg_headerx-division = c_set. "Division
wg_headerx-sales_off = c_set . "Sales Office
wg_headerx-sales_grp = c_set . "Sales Group
wg_headerx-purch_no_c = c_set . "Customer purchase order number
wg_headerx-pymt_meth = c_set . "Payment Method
wg_headerx-zzychan_role = c_set. "Channel Role
wg_headerx-zzysub_role = c_set . "Submitter Role
wg_headerx-zzy_inv_for_opt = c_set . "Invoice Format Option
wg_headerx-ord_reason = c_set . "Order Reason Code
wg_headerx-bill_block = c_set. "Billing Block
ENDFORM. " F_MOVE_HEADER_DATA
2)
FORM f_move_item_data .
wg_item-itm_number = g_itmnumber. "Item number
wg_item-material = wg_process-matnr . "Material
wg_item-target_qty = wg_process-target_qty. "Targeted Qty
wg_item-item_categ = wg_process-pstyv. "Sales document item category
wg_item-zzylegal_i = wg_process-zzlegal. "Legal Contract
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_item-zzfv_sbcnt = wg_process-zzfv_sbcnt.
APPEND wg_item TO i_item.
wg_itemx-material = c_set . "Material
wg_itemx-target_qty = c_set. "Targeted Qty
wg_itemx-item_categ = c_set. "Sales document item category
wg_itemx-zzylegal_i = c_set. "Legal Contract
wg_itemx-zzsteady_date = c_set . "Amortization Start Date
wg_itemx-zzsteady_end_dat = c_set. "Amortization Stop Date
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_itemx-ZZFV_SBCNt = c_set. "
APPEND wg_itemx TO i_itemx.
CLEAR : wg_itemx.
endform.
3)
FORM f_move_head_ext
wg_extension-structure = c_ext_vbak.
wg_ext_vbak-zzinv_format = wg_temp-zzinv_format.
wg_ext_vbak-zzychan_role = wg_temp-zzychan_role_i.
wg_ext_vbak-zzysub_role = wg_temp-zzysub_role.
wg_extension+30 = wg_ext_vbak.
APPEND wg_extension to i_extension.
CLEAR wg_extension.
wg_extensionx-structure = c_ext_vbakx.
wg_ext_vbakx-zzinv_format = c_set.
wg_ext_vbakx-zzlegal = c_set.
wg_ext_vbakx-zzychan_role = c_set.
wg_ext_vbakx-zzysub_role = c_set.
wg_extensionx+30 = wg_ext_vbakx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
ENDFORM. " F_MOVE_HEAD_EXT
*& Form F_MOVE_ITEM_EXT
* Item Extension
4)
FORM f_move_item_ext .
* Structure for BAPI parameter Extension
wg_extension-structure = c_ext_vbap.
wg_ext_vbap-posnr = g_itmnumber.
wg_ext_vbap-zzsteady_date = wg_process-zzsteady_date . "Amortization Start Date
wg_ext_vbap-zzsteady_end_dat = wg_process-zzsteady_end_dat. "Amortization Stop Date
wg_ext_vbap-zzlegal = wg_process-zzlegal. "Legal Contract
wg_extension+30 = wg_ext_vbap.
APPEND wg_extension to i_extension.
* Structure for BAPI parameter Extension - Update Indicator Fields
wg_extensionx-structure = c_ext_vbapx.
wg_ext_vbapx-posnr = g_itmnumber.
wg_ext_vbapx-zzsteady_date = c_set .
wg_ext_vbapx-zzsteady_end_dat = c_set.
* wg_ext_vbapx-zzlegal = c_set.
*wg_process-zzfv_sbcnt = c_set.
wg_extensionx+30 = wg_ext_vbapx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
and bapi calling is like below.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = wg_header
sales_header_inx = wg_headerx
logic_switch = wg_logic_switch
business_object = fp_bus_obj
status_buffer_refresh = 'X'
IMPORTING
salesdocument_ex = g_sorder
TABLES
return = i_return
sales_items_in = i_item
sales_items_inx = i_itemx
sales_partners = i_partner
sales_conditions_in = i_cond
sales_conditions_inx = i_condx
sales_text = i_text
extensionin = i_extension
extensionex = i_extensionx.
still we are not getting ZZFV_SBCNT value in VBKD table w.r.t created salesdoc(g_sorder)
Please help me from this issue.
Thank You..Hi,
Please let me know how to add custom fields in the characteristic list, My clients wants department and profit center grouping.
Please tell me how to solve it..
Thanks & Regards,
Reena..
Maybe you are looking for
-
Blank page shown instead of Open/Save As dialog box-CSV file download in IE
I am migrating an application hosted earlier on Oracle 9iAS (9.0.3.1 BP1) to OracleAS 10g (10.1.3) with Struts 1.2.9. While the below JSP code worked for the earlier s/w stack when accessed using IE 5.5 SP2 or above, a blank page is displayed with th
-
I am in the process of re-installing ADOBE CREATIVE SUITE 5 DESIGN PREMIUM because I had to change my hard drive. I haven't done this for years. There is a disk that came with the Suite called "CONTENT." It contains FONTS. I followed the instructions
-
Can packages have JSP's ?
I know that we can store servlets in Packages.But ,if at all we need packages that contain JSP's then what we have to do.Is this scenario possible. As servlet is a java code we can store them in packages.But JSP is java embedded in HTML.So, for this
-
Font Row 1.2.1: Where are my Movie Trailers?
Ok the Front Row update came and went and I still don't have any Movie Trailers. I still get the message "The movie trailer server is not responding". Not cool.
-
Solutionmanager set up- XI and ABAP monitoring
Dear All, We are in support project now and planned to do monitor XI system through solution manger. I was intimated to provide what are the things can be configured in solution manager for monitoring XI system Could anyone already monitoring XI in