Help required to upload for MIRO

Hi
I need a BAPI to uplaod the data to MIRO, I found the one BAPI_INCOMINGINVOICE_CREATE but though the system shows as success but the document is not getting posted.
Please help me out, it's very urgent for me.
Thank you.

Hi,
See the Sample code Code ..
report z_bapi_mrhr no standard page heading.
data: t_headerdata like BAPI_INCINV_CREATE_HEADER occurs 0
                                                 with header line,
     t_itemdata   type BAPI_INCINV_CREATE_ITEM occurs 0
                                               with header line,
     t_return     type bapiret2 occurs 0.
data: nrdoc  like BAPI_INCINV_FLD-INV_DOC_NO,
     anodoc like BAPI_INCINV_FLD-FISC_YEAR.
perform preenche_tabelas.
perform criar_factura.
form preenche_tabelas.
t_headerdata-invoice_ind  = 'X'.          " Factura
t_headerdata-doc_type     = 'KR'.         " Tipo Doc.
t_headerdata-doc_date     = sy-datum.     " Data Doc.
t_headerdata-pstng_date   = sy-datum.     " Data Lançamento
t_headerdata-ref_doc_no   = 'Teste BAPI'. " Referência
t_headerdata-comp_code    = '1000'.       " Empresa
t_headerdata-currency     = 'EUR'.        " Moeda
t_headerdata-gross_amount = '187.98'.     " Montante
t_headerdata-calc_tax_ind = 'X'.          " Calcular IVA
t_headerdata-bus_area     = '1001'.       " Divisão
append t_headerdata.
t_itemdata-invoice_doc_item = '000001'.     " Item
t_itemdata-po_number        = '4000010090'. " Pedido
t_itemdata-po_item          = '0020'.       " Item Pedido
t_itemdata-tax_code         = 'CG'.         " Taxa IVA
t_itemdata-item_amount      = '132.31'.     " Montante
t_itemdata-quantity         = '1.000'.      " Quantidade
t_itemdata-po_unit          = 'UN'.         " Unidade
t_itemdata-item_text        = 'VAN-C21740'. " Texto
append t_itemdata.
t_itemdata-invoice_doc_item = '000002'.     " Item
t_itemdata-po_number        = '4000010090'. " Pedido
t_itemdata-po_item          = '0030'.       " Item Pedido
t_itemdata-tax_code         = 'CG'.         " Taxa IVA
t_itemdata-item_amount      = '25.66'.      " Montante
t_itemdata-quantity         = '1.000'.      " Quantidade
t_itemdata-po_unit          = 'UN'.         " Unidade
t_itemdata-item_text        = 'VAN-C10690'. " Texto
append t_itemdata.
endform.                    " preenche_tabelas
form criar_factura.
call function 'BAPI_INCOMINGINVOICE_CREATE'
   exporting
     headerdata                = t_headerdata
   IMPORTING
     INVOICEDOCNUMBER          = nrdoc
     FISCALYEAR                = anodoc
   tables
     itemdata                  = t_itemdata
     return                    = t_return.
if not t_return[] is initial.
   rollback work.
else.
   commit work.
endif.
endform.                    " criar_factura
You can try the Function module
MRM_INVOICE_CREATE

Similar Messages

  • Help required !! For MRP at Storage location level

    Hi ,
    we need to have separate MRP fro two storage locations with direct procurement from Storage locations. Right now we have MRP run at Plant level for all the storage locations. we donot want the materials in these two storage locations to be planned at Plant level only with Separate storage locations. Plant level MRP will run for the other storage locations .
    I have created separate MRP areas for the storage locations & activated MRP for MRP Areas client level. material masters for the two storage locations have been asigned the MRP areas & maintained the MRP area data in material master .
    When we run the MD01, the Planned orders are getting created at both MRP areas plus at the Plant level.we donot want the planned orders creation at Plant MRP area level-only at the storage location level for those two storage locations MRP areas.
    Can anybody guide me -how to achieve that ? Did we miss any configuration?
    I tried to maintain scope of planning & getting error for parallel processing .
    Do i need to maintain parallel procesing with servers ?
    Pls need your input on this. Any help will be highly appreciated .
    Thank you in advance.
    Regards,
    Krish.

    Hi Krish,
    Go to following IMG path and check out your settings -
    IMG>>>Production>>>MRP>>>Master Data>>>>MRP Areas>>>
    (1) Activate MRP for MRP Areas    -
      Is that activated?
    (2)Define MRP areas>>>> Do setting s as per Storage Location
    Then run MRP.
    MRP Areas
    In this IMG activity you define whether MRP is to be carried out with MRP areas. In addition, you define the MRP areas for each plant in which you would like to carry out this type of materials requirements planning.
    The MRP area represents an organizational unit which carries out materials requirements planning independently. The results of the planning run are displayed specifically for each MRP area. An MRP area can include one or several storage locations of a plant or stock with a subcontractor.
    You can assign a material to various MRP areas.
    Basically, there are three types of MRP areas:
    Plant MRP Area
    Initially, the plant MRP area includes the plant with all its storage locations and stock with subcontractors. When you have defined MRP areas for storage locations and for subcontractors and you have assigned the materials, the plant MRP area is reduced by exactly this number of subcontractors and storage locations, as they are now to be planned separately.
    MRP Areas for Storage Locations
    You can define an MRP area that consists of a particular storage location by creating an MRP area and assigning the storage location to it. Material requirements for this storage location are then planned separately from the rest of the plant. You can also group several storage locations into one MRP area by creating an MRP area and assigning the storage locations. These storage locations are then planned together.
    MRP Areas for Subcontractors
    You can also define an MRP area for each subcontractor. Using an MRP area, it is possible to plan the components to be provided in subcontracting, by defining an MRP area for each subcontractor and assigning the components to be provided. You can therefore plan the requirements to be provided for these components for one subcontractor separately from the usual requirements.
    Up to now, MRP at plant level had been carried out. The various requirements were combined in the planning run and procurement elements were created for these pegged requirements with unknown sources.
    The introduction of MRP areas enables you to carry out material requirements planning and know the source of the pegged requirements and to be able to distinguish between them. The source of the pegged requirements can be, for example, production on a particular assembly line or a subcontract order.
    Material requirements planning for each MRP area allows you to have specific control over the staging and procurement of important in-house production parts and purchased parts for each shop floor and assembly area.
    Hope this will give you more idea about the same.
    Satish

  • Help required: Configure output for goods issue

    Dear All,
    My requirement is to trigger an output type for a goods issue only when the goods movement
    scenario involves cross company accounting. What is the TCode for doing the requirement setting
    for goods issue output.
    Thanks.

    Hi,
    Please check it out,is there any standard requirement is there for your scenario,if it is not there as ABAP people to write one requirement in VOFM and assign to this condition type.

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Some help required with logic for a dynamic sql query

    i have below code but not sure how to resolve this problem - what i need is to be able to dynamically
    the problem:
    i have a rabbge of paratmeters coming in from a form and need to be able to create a dynamic query string to go into a prepared statement object.
    the problem i have is there are 2 fields year range and year.
    if year range is none i need to create the query string as such :
    where the value of year can be serached on exactly
    str.append("VOLUME_YEAR = ? ");the probelm is if the year range is 5 or year range is 10 i dont know how to maipulate the query string to be able to set the string such that i can then place the year value in the place holder in preparedStatement.setInt(1, year)
    how can i create the intial query string ie.- what are the possible things that i can do. - i'm thinking of things like putting some type of between or such type query statement - but not at all sure how the syntax would go - ie. how would i use the year value and how would i create this dynamic part of the query string so that the JDBC regonises it?
    thanks for any help.
    public String setVolumeYearQuerySt(String year, String yearRange, StringBuffer str){
              String volumeYearQueryString = null;
              Sring doAction= null;
              if (yearRange.equals("None")){str.append("VOLUME_YEAR = ? ");}
              else if(yearRange.equals("5 Years")){doAction = "Nothing";}
              else if (yearRange.equals("10 Years")){doAction = "Nothing";}
              return volumeYearQueryString;
              }

    Saish - thanks a lot for the code example.
    Although, i think its far too advanced for me to understand and try to manipulate it and fit my problem. I'm pretty new to programming as you can probably see from my simple if else type statements. But i'm going to give it a try and see how it goes.
    could you please be kind enough to demonstrate how i could use the above syntax to do the following. --
    i have a year being entered in form .  in the database there is a column year volume which contains year in single year value format and also in a year range  value format - thus as in below - how could i do this -
    eg.
    user can enter a value in the year field a single value or a range value - then he can select +/-5 or 10 yrs range on that value - the DB holds the values as single values and ranges as below -
    one suggested apporach is as follows if a single user is alloweed to enter only a single value in the filed and select a query range +/- 5 etc..
    volume year of �1926-1928� and the user enters �1927�, the query has to find all records where
    look for records that are �less than or equal to� 1927.  It then has to check to see if it contains a range.  For those that it finds containing a range, it has to work out what the �upper� year is and check to see if that is �greater than or equal� to 1927.  If it is, then that is a possible matchanother approach that is suggested is to have a drop down with all years from databse and user is only llowed to select value from drop down and following logic is suggested :
    Because volumes can be received as ranges (e.g. 1964-1966), some extra coding is required where the user asks for a Year Range (such as + or � 5).
    Using the Year selected from the dropdown list, split it into 2 values, a low year and a high year. For example, if �1965-1968� is selected from the year dropdown, split it into �1965� and �1968� for the low year and high year respectively. If �1964� is selected from the year dropdown, split it into �1964� and �1964�. Now take the Year Range that the user has entered into account. For example, if the user has entered 5, subtract 5 from the low year and add 5 to the high year. Using these values, include the following search criteria in the query to the database:-
    (<low year>     BETWEEN
                 left (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1)
         AND     right (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1))
    OR     (<high year>     BETWEEN
                 left (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1)
         AND     right (VOLUME_YEAR, charindex ('-',VOLUME_YEAR + '-') - 1))regards - i think if i could solve the first approach that would be something good as its most user freindly
    thanks

  • Help Required :Excel Upload Into Oracle Table Using PLSQL Procedure/Package

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    I also Tried to Use This
    But How can i Use SQLLDR Command In Stored Procedure.
    Well IN SQL*PlUS it is successfull but in Stored Procedure /Package ,PL/SQL does not recognise the OS commands.
    So now my Question How can I recognise the SQLLDR Commnad in Stored Procedure.

  • Help required:Spool Creation for posted document in FB03 transaction

    Hi Experts,
    The requirement is like I have to send the PDF document to the user by mail once the document gets posted in SAP ECC. The posting is taking place by IDOC.
    The problem is how do i get the spool request for the document which is posted in ECC. It can be seen by entering document number in FB03 transaction but there is no smart form or SAP script or any Output type. The document is posted by IDOC.The client wants the PDF document excatly as seen from FB03 transaction. Please help as this is typical requirement i have never come across.
    Do let me know some of the user exits where in just after the posting i can write my code for spool creation. The idoc is using the BAPI_ACC_DOCUMENT_POST.

    HI
    In test mode i am able to view the document no. but not the reference document no and when double click on the document no i am not able to view the journal entry.
    Thanks.

  • Urgent help required...for replacing JSP session variables

    I am trying to enhance the performance of a j2ee based webapp which use session variables to store the data...
    Is there any alternative for session variables..The project is based on j2ee-Struts frame work..But the amount of code maintainance should be minimum ....so i can't create beanforms for all these data...
    Is there any XML based methods available...??

    ok... thanks... i created a fla file and inthe action script
    pasted the following code
    var nc:NetConnection = new NetConnection();
    nc.connect("rtmp://flash.ispstream.com/ondemand/unikron/my_video_dj/");
    var ns:NetStream = new NetStream(nc);
    contentMain.myVideo.attachVideo(ns);
    ns.setBufferTime(5);
    ns.play("dvd_r");
    nothing is working if i tried to load... can u help me out

  • Help required in BDC for Vendor creation

    Hi ,
         I have to create vendors using bdc via trxn FK01.
    my requirement is to add multiple street adress but while recording initial screen contains only one line for street.
    how should i proceed ?
    I am working in ecc6.0.given below is my BDC.
    perform open_group.
    loop at record.
    perform bdc_dynpro      using 'SAPMF02K' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-BUKRS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-BUKRS'
                                  record-bukrs.
    perform bdc_field       using 'RF02K-KTOKK'
                                  record-ktokk.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-REGIO'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-ANRED'
                                  record-anred.
    perform bdc_field       using 'LFA1-NAME1'
                                  record-name1 .
    perform bdc_field       using 'LFA1-STRAS'
                                  record-stras.
    perform bdc_field       using 'LFA1-ORT01'
                                   record-ort01.
    perform bdc_field       using 'LFA1-PSTLZ'
                                  record-pstlz.
    perform bdc_field       using 'LFA1-LAND1'
                                 record-land1.
    perform bdc_field       using 'LFA1-REGIO'
                                  record-regio.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ALTKN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-AKONT'
                                  record-akont.
    perform bdc_field       using 'LFB1-ALTKN'
                                  record-altkn.
    perform bdc_dynpro      using 'SAPMF02K' '0215'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-ZWELS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFB1-REPRF'
                                  record-reprf.
    perform bdc_field       using 'LFB1-ZWELS'
                                  record-zwels.
    perform bdc_dynpro      using 'SAPMF02K' '0220'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB5-MAHNA'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0610'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-QLAND'.
    perform bdc_transaction using 'FK01'.
    refresh bdcdata.
    clear bdcdata.
    endloop.
    perform close_group.
    Edited by: Rachel on Jun 19, 2008 11:23 AM

    Hi,
    while recording from the SHDB, in the initail screen of FK01
    you will have the check box Use central address management. check that, you will get multiple streets.
    Thanks,
    Rajinikantth

  • Help required in picking for OBD

    Hello Experts,
    In Outbound Delivery,  Overall WM Status is shown as "No WM Transfer Order required" in the "Picking"  Tab.
    Hence I am not allowed to create TO for this Outbound delivery
    Can somebody breifly explain me the settings required in my case so that I can create a TO and print the picklist for this OBD?
    Thanks,
    Shetty

    Define a plant/storage location for the delivery items which plant/SLoc combination is assigned to a warehouse (in data table T320 you can check plant/SLoc-WH assignments or SM30 V_T320.) In this case your delivery item should be relevant to WM-picking.
    W/o warehouse management it is also possible to print picking list (you need a suitable output type for it for application "V2" (shipping)).
    Edited by: Csaba Szommer on Jul 15, 2010 10:23 AM

  • Help required: Two smartforms for same output type?

    Dear All,
    I have a requirement to display bill of lading for a shipment.
    The shipment usually contains two kinds of materials.
    The data to be displayed for the first set of materials data is different from what is
    displayed for the second set/kind of materials. The layout(columns and structure) is entirely
    different. But the user wants to see the two sets of data in two pages, (for the same output type).
    But, from what I know, we can only associate one smartform to an output type.
    Any inputs.
    Thanks.

    Hi
    V/30, just check your output type, if you click on form and routines there is option assigning multiple programs and forms (i,e, Upto 5).
    Have not tried it , you can try and let us know your feedback
    Regards
    Jitesh

  • URGENT HELP REQUIRED - E-filing for GB - IMG CONFIG

    Hi
    We are on ECC 6.0 and have just installed XI. I am trying to complete the SAP IMG Config, however there is limited documentation about this, particularly the constants and e-mail content.
    Does anyone have any useful (ideally step by step) documentation on how to complete the customisation?
    Your URGENT assistance is greatly appreciated.
    Thanks
    Michelle

    Hi refer theses links
    http://help.sap.com/saphelp_erp2005/helpdata/en/cd/5a0641f753f523e10000000a155106/frameset.htm
    EOY2007 GB (E-Filing)

  • Help required: EKKO-VERKF for consignment invoice

    Dear All,
    My requirement is to print the value of sales representative from the purchase document header.
    This information is to be printed on consignment invoice.
    The print program to be modified is RM08NAST ( form routine ENTRY_KONS, script:MR_PRINT)
    Can any one suggest me the mapping between purchase document and consignment.
    Thanks.

    Are you not using a Z program to print the invoice i mean a form.
    In that case you can get the required field  .
    reward if useful
    rajesh

  • Help Required ---  TO_CHAR function for formatting DATE

    Tue, 20 Jan 2004 17:39:11 GMT.
    I want the output in the above mentioned format . Can any one help me ,Please.
    I tried some thing like this.......
    select to_char(sysdate,'Dy, DD Mon yyyy HH24:MI:SS') from dual; and them Append GMT to it. Is this correct the way ? :D.

    You can append the results of the following (assuming the database timezone is GMT):
    select dbtimezone from dual;

  • Help required in J2ME for developing software

    Respected Friends,
    I want to make an application in J2ME for Sony Ericson K700i mobile phone which is connected to the serial port of the PC,this application would be running inside the cellular mobile phone,when I will run this application all the files in the "File Manager" folder of mobile with .txt extensions would be copied to the PC to some paticular folder passing through the serial port to which the mobile is connected,I am facing some problems while devloping this application,my questions are as follows:
    1) Is it possible to transfer a file on the serial port,off course we can transfer interger type data to the serail port but integer is a primitive data type and while transferring files we will actually pass the object related to that file to the serial port of the PC,is this really possible?
    2) Sony Ericson K700i does'nt implements JSR 75(PDA Optional Packages for the J2METM Platform,which is used to access PIM data and file systems) which means that we can not access the file system of this mobile so is it really possible to access the files stored in this mobile through my application?
    3) Once the file is transferred to the serial port than will its contents of the file ramains in its original state or will be transferred to some kind of bianry data and we have to bring it in the original state.On the PC end will I need to write some other application which continiously monitores the serial port and will receive this file.
    I would be waiting for your precious replies.
    Thanking You,
    Taqi Raza.

    Define a plant/storage location for the delivery items which plant/SLoc combination is assigned to a warehouse (in data table T320 you can check plant/SLoc-WH assignments or SM30 V_T320.) In this case your delivery item should be relevant to WM-picking.
    W/o warehouse management it is also possible to print picking list (you need a suitable output type for it for application "V2" (shipping)).
    Edited by: Csaba Szommer on Jul 15, 2010 10:23 AM

Maybe you are looking for

  • Unable to open Canon 7D CR2 raw files in Photoshop CS6

    Hi Folks, I have been trying to open Canon 7D CR2 raw files in Photoshop CS6 (Extended) (Windows 8.1) but I'm always getting the error "Could not complete your request because the file format module cannot parse your file". I installed the Camera Raw

  • Text Overlapping/Wrapping Issue in BSP(Table Sorter Using JQUERY)

    Hi , I have a requirement to add a new column in existing table which has been built by Table Sorter method in JQUERY. I have added the new column but the issue is value for the new column is populated  on next line of the table. This could be a simp

  • In which jar file SAP NW(EP) connector class available

    hi i want to know in which jar file the javaconnector class is available and i'm developing one plugin to connect sap ep to sap km repository to fetch docs from repository. for this i need some java classes so pls help me out from this problem..... r

  • Why can't i print wireless

    why can't i print wireless?

  • Prettier way to do RMI?

    I don't like the RMI registry. I think it makes RMI ugly because: 1. Anybody using my application has to start it independently of my application. 2. It requires extra mucking about with the classpath to get my application to work. 3. From my code's