BAPI to Post MIGO deatils with Excise Deatils

Is there any BAPI in SAP which can do both Goods Movement (101 ) and  posting of Excise details.?
BAPI_GOODS_MOVEMENT_CREATE. doesn't have excise details.

Hi Priya,
There are lot of documents available on internet for BDC tutorial. This transaction involves BDC with table control, which is bit tricky. I am pasting sample code for your reference. Don't copy paste the same code it might not work because the screen configuration may vary system to system.
DATA: l_mstring(480).
DATA: count TYPE n LENGTH 2 VALUE '01'.
DATA: wrk_txt TYPE char21.
DATA:  f_option         TYPE ctu_params.
DATA:  itab_bdcmsgcoll TYPE bdcmsgcoll OCCURS 0.
DATA:  wa_msgs TYPE   bdcmsgcoll.
f_option-updmode  = 'L'.
f_option-defsize  =  'X'.
f_option-dismode  = 'A'.
*  BREAK-POINT.
LOOP AT it_data INTO wa_data.
wa_mac-mblnr    = wrk_matdocu.
wa_mac-mjahr    = wrk_matyear.
wa_mac-exnum    = wa_data-exnum.
wa_mac-exdat    = wa_data-exdat.
*    wa_mac-posnr    = wa_data-posnr.
*    wa_mac-exbas    = wa_data-exbas.
wa_mac-exbed    = wa_data-exbed.
wa_mac-ecs      = wa_data-ecs.
wa_mac-exaddtax1 = wa_data-exaddtax1.
wa_mac-exaed = wa_data-exaed.
APPEND wa_mac TO   it_mac.
ENDLOOP.
it_mac_copy[] = it_mac[].
SORT it_mac BY mblnr.
DELETE ADJACENT DUPLICATES FROM it_mac COMPARING mblnr.
LOOP AT it_mac INTO wa_mac.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=J1IEX_OK_GO'.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-ACTION'
'A01'.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-REFDOC'
'R05'.
PERFORM bdc_field       USING 'BDC_CURSOR'
'J_1IEXDYNPRO-MAT_DOC'.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-MAT_DOC'
wa_mac-mblnr.
*                                  wa_mac-mblnr.
PERFORM bdc_field       USING 'BDC_CURSOR'
'J_1IEXDYNPRO-MAT_DOC_YEAR'.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-MAT_DOC_YEAR'
wa_mac-mjahr.
*    PERFORM bdc_field       USING 'J_1IEXDYNPRO-DETAIL_ZEILE'
*                                  '   1'.
*    PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '=OK_GO'.
PERFORM bdc_field       USING 'BDC_CURSOR'
'J_1IEXHEAD-EXDAT'.
PERFORM bdc_field       USING 'J_1IEXHEAD-EXNUM'
wa_mac-exnum.
PERFORM bdc_field       USING 'J_1IEXHEAD-EXDAT'
wa_mac-exdat.
LOOP AT it_mac_copy INTO wa_mac_copy WHERE mblnr = wa_mac-mblnr.
IF count GT '2'.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=P+'.
count = 1.
ENDIF.
CLEAR wrk_txt .
CONCATENATE 'J_1IEXITEM-ZEILE(' count ')' INTO wrk_txt .
PERFORM bdc_field       USING 'BDC_CURSOR'
wrk_txt.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-DETAIL_ZEILE'
wrk_txt.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-DETAIL_ZEILE'
wrk_txt .
PERFORM bdc_field       USING 'J_1IEXDYNPRO-DETAIL_TAKE'
'X'.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=J1IEX_OK_LINE_CLICK'.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=OK_GO'.
PERFORM bdc_field       USING 'J_1IEXHEAD-EXNUM'
wa_mac-exnum.
PERFORM bdc_field       USING 'J_1IEXHEAD-EXDAT'
wa_mac-exdat.
*      PERFORM bdc_field       USING 'J_1IEXITEM-TOTAL_BED'
*                                     wrk_exbed.
PERFORM bdc_field       USING 'J_1IEXITEM-TOTAL_BED'
wa_mac_copy-exbed.
PERFORM bdc_field       USING 'J_1IEXITEM-TOTAL_ECS'
wa_mac_copy-ecs.
PERFORM bdc_field       USING 'J_1IEXITEM-TOTAL_AT1'
wa_mac_copy-exaddtax1.
PERFORM bdc_field       USING 'J_1IEXITEM-TOTAL_AED'
wa_mac_copy-exaed.
PERFORM bdc_field       USING 'J_1IEXDYNPRO-DETAIL_TAKE'
'X'.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=OK_GO'.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=J1IEX_OK_LINE_CLICK'.
count = count + 1.
ENDLOOP.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=OK_GO'.
PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=OK_CHECK'.
*    PERFORM bdc_transaction USING 'J1IEX_C'.
PERFORM bdc_field       USING 'BDC_OKCODE'
'=OK_POST'.
CALL TRANSACTION 'J1IEX_C' USING bdcdata
OPTIONS FROM f_option
MESSAGES INTO itab_bdcmsgcoll.
IF sy-subrc EQ 0.
READ TABLE it_data INTO wa_data INDEX 1.
MESSAGE i009(zmm) WITH wa_data-exnum wa_data-exdat.
ELSE.
MESSAGE i010(zmm) WITH wa_data-exnum wa_data-exdat.
ENDIF.
leave to screen 0.
ENDLOOP.

Similar Messages

  • BAPI for Posting through FBS1 with reversal reason & reversal Date

    All Experts,
    Can I use BAPI_ACC_DOCUMENT_POST for posting in FBS1 with reversal reason & reversal date? I can't find such option in the BAPI. If not, can you suggest other BAPI that I can use to perform posting with reversal reason & reversal date?
    Thanks in advance.
    Regards,
    Azad.

    You need to use RFBIBL00, create a file to be consumed by it and it will create a session variable that can be run by SM35

  • BAPI for doing MIGO along with capturing excise values.

    i am doing good reciept for stock transfer through MB01  through BAPI_GOODSMVT_CREATE . In BAPI_EXCINV_CREATE_FROMDATA there is no code AVAILABLE as this bapi is not released . HOW TO GET CODE FOR IT
    how to do this with bapi only TO UPDATE EXCISE INV VALUES IN GOOD RECIEPT DOCUMENT
    Edited by: deepika jain on Mar 11, 2010 8:59 AM

    Hi,
      Here is the code for the FM and Country India Version:
    FUNCTION BAPI_EXCINV_CREATE_FROMDATA .
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(OBJ_HEADER) LIKE  BAPI_J_1IEXCHDR STRUCTURE
    *"        BAPI_J_1IEXCHDR
    *"     VALUE(PROCESS_FLAG) LIKE  BAPI_J_1IEXCHDR-REF_INDICATOR
    *"  TABLES
    *"      OBJ_ITEM STRUCTURE  BAPI_J_1IEXCDTL
    *"      RETURN STRUCTURE  BAPIRET2
    ENHANCEMENT-POINT BAPI_EXCINV_CREATE_FROMDATA_G8 SPOTS ES_SAPLJ1IBAPI STATIC.
    $$-Start: BAPI_EXCINV_CREATE_FROMDATA_G8----
    $$
    ENHANCEMENT 5  MGV_GENERATED_SAPLJ1IBAPI.    "active version
    DATA: T_MGV_FNAMES1 LIKE MGVBAPIFNAMES OCCURS 0 WITH HEADER LINE.
    ENDENHANCEMENT.
    $$-End:   BAPI_EXCINV_CREATE_FROMDATA_G8----
    $$
    ENHANCEMENT-POINT BAPI_EXCINV_CREATE_FROMDATA_G6 SPOTS ES_SAPLJ1IBAPI.
    $$-Start: BAPI_EXCINV_CREATE_FROMDATA_G6----
    $$
    ENHANCEMENT 1  MGV_GENERATED_SAPLJ1IBAPI.    "active version
    *{BAPI Begin} generation http://intranet.sap.com/materialversion
    *Do not change coding between begin and end comments. ANI 20050118
    T_MGV_FNAMES1-INT = 'MATERIAL'.
    T_MGV_FNAMES1-EXT = 'MATERIAL_EXTERNAL'.
    T_MGV_FNAMES1-VERS = 'MATERIAL_VERSION'.
    T_MGV_FNAMES1-GUID = 'MATERIAL_GUID'.
    APPEND T_MGV_FNAMES1.
    CALL FUNCTION 'MATNR_BAPI_TABLES_CONVERSION'
    EXPORTING
      INT_TO_EXTERNAL = ' '
    TABLES
      T_FNAMES = T_MGV_FNAMES1
      T_MATNR  = OBJ_ITEM
    *{BAPI End} generation
    ENDENHANCEMENT.
    $$-End:   BAPI_EXCINV_CREATE_FROMDATA_G6----
    $$
    *This function takes input from external system regarding the
    Excise invoice header and item. The process_flag tells whether
    *the invoice is incoming or outging. The transaction type is to be
    *set accordingly. Excise invoice number is generated externally
    *This function generates an internal number, Part 2 numbers and
    *creates an FI document for the CENVAT posting. The logical system
    *details coming from the external application needs to be updated
    *into the excise data as well as accounting data
    ENHANCEMENT-POINT BAPI_EXCINV_CREATE_FROMDATA_G7 SPOTS ES_SAPLJ1IBAPI.
    $$-Start: BAPI_EXCINV_CREATE_FROMDATA_G7----
    $$
    ENHANCEMENT 2  MGV_GENERATED_SAPLJ1IBAPI.    "active version
    *{BAPI Begin} generation http://intranet.sap.com/materialversion
    CALL FUNCTION 'MATNR_BAPI_TABLES_CONVERSION'
    EXPORTING
      INT_TO_EXTERNAL = 'X'
    TABLES
      T_FNAMES = T_MGV_FNAMES1
      T_MATNR  = OBJ_ITEM
    *{BAPI End} generation
    ENDENHANCEMENT.
    $$-End:   BAPI_EXCINV_CREATE_FROMDATA_G7----
    $$
    ENDFUNCTION.
    cheers
    Aveek

  • BAPI for posting GR with reference to inbound delivery

    Hi Gurus,
    Please suggest me a BAPI to post the GR with respect to inbound delivery. Also, it would be better , if the partial GR can be done using this BAPI. We need to use a BAPI, so that the material document flow is updated as well after the processing of BAPI.
    I can not use the BAPI: BAPI_GOODSMVT_CREATE, as this does not update the material document flow. Also, the BAPI BAPI_INB_DELIVERY_CONFIRM_DEC can not be used, as this BAPI does not let me do a partial GR.
    Regards,
    Neha Gupta

    Hi ,
    thank you for quick response.
    FM L_TO_CREATE_DN.. use to create wrt to Delivery number(all line items together), but in current scenario want to create TO
    for single line item and also with partial quantity .
    Regards,
    Madhavi

  • Error while posting A/R Downpayment Invoice with Excisable Tax Code.

    While posting A/R Dowpayment Invoice with Excisable Tax Code error of "Unbalanced Transaction" appears. This error does not occur while posting A/R Downpayment Invoices with Non-Excisable Tax Codes.
    Kindly provide a solution for the same.

    SAP Note Number: 1179405
    Error -5002 when trying to copy a document with Sales BOM
    In order to create the delivery via the DI, you need to set the oDoc.Lines.BaseLine value to the LineNum value from the RDR1 table (in the above example you should enter the value 2).
    we set oDoc.Lines.BaseLine=0 before starting the lines loop. This has resolved the issue.
    This note was really helpful and it was found in another query.
    You can also refer to this. https://forums.sdn.sap.com/click.jspa?searchID=19070513&messageID=6178079
    Thanks.
    Edited by: Sadanand Manda on Nov 24, 2008 12:16 PM

  • Posting the GR with FM mb_create_goods_movement use the T-code MIGO

    Can any one suggest me It is possible Post the GR with help of FM mb_create_goods_movement with Transaction MIGO .
    The reason for MIGO i want to Post GR with Handling unit .
    I try to post the GR with FM It always export some value in EMKPF-mblnr field and sy-subrc eq 1.
    NO which is available on the MBLNR is not available in database.
    Please give the solution.

    Hi Rajeev,
    Can you please give me the sample code for the same??
    Regards,
    Sankar

  • MIGO not updating with excise value.

    Hey Guys,
    I am facing with this problem of MIGO not
    updating with excise value.
    When I am creating the MIGO doc, and after
    I give the excise invoice no. the excise
    values are not picking up. Its showing
    zero values.
    The following
    steps are being followed by me.
    ME21N - Create STO from plant to warehouse
    VL04 - Create outbound delivery
    VF01 - Create invoice
    J1IIN - Excise invoice
    MIGO - Goods receipt at warehouse
    Earlier it was working fine, but after
    we upgraded the system with patches and implemented
    Secondary higher education cess the
    problem arose.
    Please advise.
    Appreciate your help.
    Thanks,
    Zak

    Got answer from SAP..dunno what they did but it was rectified.

  • Post Goods Issue with BAPI with reference to BOM

    Hi All,
    I want to post Goods Issue with BAPI / FM with reference to BOM.
    The requirement is like to replicate what we can do with MB1A with reference to BOM with BAPI / FM.
    Please give ur suggestions.
    Thanks in advance.
    Chintan.

    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_forums_rm&query=kanban&adv=false&sortby=cm_rnd_rankvalue&sortmode=true&searchmode=similar&similardocsuri=/forumsrm/1_category/42_category/50_forum/34196_thread/322837_message

  • EDI documents are posted to SAP with BAPI  ...How?

    how is that EDI documents are posted to SAP with BAPI....is there some step by step doc to do that.....

    Hi,
    There are couple of EDI subsystems like Meractor from where you can fire a BAPI to post a document into our SAP system.
    First the EDI subsystem receives the EDI document and from there are going to fill all the internal tables of the BAPI and call that BAPI from the EDI subsystem itself, if the BAPI is successfully executed then it will return the document number and if it fails then it will throw the error why it has failed.
    If it has failed then the EDI team will look into the reason and work on it, if it is a data related then they will take care and it is a problem with the config then they are going to intimate the SAP team to make the necessary config and they will refire the BAPI again.
    Thanks,
    Mahesh.

  • Return delivery process with excise in MM module

    Dear Friends,
                        this is chandu working as a consultant-mm , please any one can give the clear information regarding return delivery process for excise material , i'm following one process that is after invoice verification
    1) reverse excise invoice with MR8M
    2) return delivery with MIGO
    3) prepare outgoing excise invoice with J1IS  for print out J1IV
    4) preparing credit memo in MIRO with reference to original po
    the second process
    1) create return po with selecting return po check box in po
    2) GR with reference to the return po
    3)then J1IS  and J1IV  same process
    4) credit memo for return po in MIRO
    this 2 ways i'm doing the process  in the registers part1 that is qty updating (i.e qty is reducing)  but in the case of part2 that is the value it is not updating (i.e value has to reduce in the register right i'm working first time on CIN plz guide me the correct procedure if i'm doing wrong , in this my problem is only value not updating part2 register plz give me solution with clear explanation .
    regards
    chandu

    Hi,
    Follow the below mentioned procedure;
    1. ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item)
    2. MIGO - Goods Receipt > Purchase Order (Returns PO) (Here system will hit Mvmt type "161" and you can also select Un-restricted/blocked stock from where you want to return the stock)
    3. J1IS u2013 Excise Invoice Other Movements
    Here click on u201Ccreateu201D button to create an outgoing excise invoice and reverse the CENVAT Amount.
    Here put all details as below and Press u201CEnteru201D.
    Ref.doc.type - MATD, Doc Number - Material document No of 161 mvmt, Doc Year, Series Group, Excise Group and Vendor
    Here check BED, ECS and SECess values to be reversed and click on u201CSaveu201D button to post the excise invoice.
    4. J1IV - Post and Print Outgoing Excise Invoice.
    5. MIRO - Credit memo w.r.t. Returns PO.
    Regards,
    Mahesh Wagh

  • BAPI to post invoice against a Scheduling agreement

    Hai,
    Can someone guide me which BAPI to use to post a Invoice against a scheduling agreement.
    Thanks,
    Upender

    Things which need to be taken care of:
    You need scheduling lines for todayu2019s date or in the past
    You need to release the JIT/FRC(ME84)
    You need to print out the delivery schedule (ME9E)
    Then it is possible to post the GR with MIGO.
    Hope this helps!
    Sofia

  • Intercompany Stock transfer order with excise

    Hi,
    Can anyone  tell me about Intercompany Stock transfer order with excise step by step.
    hoping to replu

    Hello,
    Create Stock Transport Order - ME21N
    Create Delivery Challan (DC) - VL10B (this reduces the inventory from supplying plant)
    Create Excise Invoice refering the DC created above - J1IS - Ref document type OTHR (Excise values are transfered in this step)
    Do goods receipt against the DC (outbound delivery) - MIGO in receiving plant. Also capture and post the excise invoice cerated in J1IS.
    Regards
    Mahesh Naik

  • REVERESE SUBCONTRACTING WITH EXCISE DUTY

    Job Work done by Client with excise duty
    Business Process,
                                 Raw material got from the Customer & it is processed by Client finished goods are made the same will be delivered to the Customer with excise duty.
    Details:
    1     Sales order will be created with the details of raw materials that customer agreed to give & finished product that customer need after getting the P.O from the customer.
    2     Customer will send the material with excise invoice (paid by customer).
    3     Client receives the material post the customer excise invoice with part-1 & part-2 entry in the RG23A register.i.e Cenvat credit taken by Client for the customer material.
    4     The received Raw material processed by Client converted to finished product with RG1 entry.
    5     Finished send to the customer with excise duty paid by Client
    6     As excise duty liability is with Client every month excise duty difference between credit taken & paid is settled with customer.
    E.g. For August month
              Cenvat credit taken for raw materials Rs-10000
              Excise duty paid by the Client Rs-50000
              Difference to be paid by the customer to Client is Rs-40000
    Pl guide me how to map this process in cin
    Regards
    Umapathy.M

    Hai,
    The pre requisties for this scenario in CIN part is
    1. Create the input raw material with UNBW material type.
    2. Create the customer as a vendor.
    3. Maintain the input material in J1ID with material type raw material & chapter ID.
    4. Maintain the excise details for this vendor with excise indicator.
    5.Maintain the assessable value for this material in J1ID. This has to be flow for excise calculation.
    6.Maintain the excise tax rates for the Chapter id in J1ID.
    7.Mainain the 501 Mvt type in IMG - Logistics general - Tax on goods & movements - India - Business transactions - Incoming excise invoices - specify which mvt type involves excise invoices.
    8.Maintain the settings for register entries & GL accts in Acct determination in IMG - Logistics general - Tax on goods & movements - India - Acct determination for the excise transaction type EWPO.
    The steps involves are
    1.Create a sale order with excise tax code conditions for the processed fininshed product.
    2.Do the MIGO with other receipt for 501 Mvt type to receive the raw material. Capture the excise invoice in the MIGO itself.
    3.Post the excise invoice by J1IEX.
    4.Do the process with PP cycle.
    5.Send the finished product with SD route.
    6.Do the Billing & outgoing excise invoice.
    7.The SD  Pricing procedure has to be configured as per the requirement.
    8.Check the accting entries at the Customer acct.

  • Return to vendor with excise duty..?

    Hi all
    can anybody explain me how to do return delivery to vendor with excise return,  after invoice verification.
    Pls explain me step by step with example (excise duty example ).
    firt ve have captured and posted excise duty frm vendor ,
    1. then i have created return PO with same tax code with excise duties 1421% + 4% vat. tax valus r flowing properly in return PO (1421%+4%vat).
    2.while doing MIGO (wht is mvt type )and wht to do in excise tab.
    3...wht is process
    Thanks
    sap-mm

    Dear,
    After done Return delivery
    J1IS u2013 Excise Invoice Other Movements
    Here click on u201Ccreateu201D button to create an outgoing excise invoice and reverse the CENVAT Amount.
    Here put all details as below and Press u201CEnteru201D.
    Ref.doc.type - MATD, Doc Number - Material document No of 161 mvmt, Doc Year, Series Group, Excise Group and Vendor
    Here check BED, ECS and SECess values to be reversed and click on u201CSaveu201D button to post the excise invoice.
    J1IV - Post and Print Outgoing Excise Invoice.
    Regards,
    Mahesh Wagh

  • Sub-contracting with excise duty..?

    Hi all
    can anybody explain me the sub-contracting process with excise duty , here we are going create excise invoice(J1IS instead of sub-contract challan) and what abt material document for sending out materials
    whether v an use excise invoice as material transfer document to jobber place or what.
    Please explain me with example ..
    Regards
    sap-mm

    hi ,
    you can try:
    1.Do the MB1A with 202 mvt type to get back the material from the Work location Cost center to Storage location.
    2.Create the Subcontracting PO without payment of excise duty ie., with subcontracting challan. Here the components provided to the vendor & material at item overview should be the same.
    3.Do the MB1B - 541 Mvt type transfer posting.
    4.Create the subcontracting challan w r t material doc by J1IF01
    5.Do the MIGO for SC PO.
    6.Reconcile the SC Challan.
    7.If the qty is fully reconciled then you can complete the challan.
    8.Do the LIV for SC PO.
    9.Do the MB1A with 201 MVT type to issue the material to the Work location.

Maybe you are looking for