Require a Function Module or a BAPI

Hi,
Does anyone in here knows a FM or a BAPI(preferred) that would take the Material Number & Plant as input and return the available quantity available under different storage location for the plant.
No logic is to be written. Strict usage of FM or BAPI.
Suggestions welcomed.
Thanks & Regards,
Rajesh

BAPI_MATERIAL_GET_DETAIL can be used.
If you change your mind sometime,
here is the code for it
select matnr
       werks
       lgort
       LABST
  from mard
  into table it_mard
where matnr in s_matnr
   and werks in s_werks.
Regards,
ravi

Similar Messages

  • Is it possible to call custom designed RFC function module, apart from BAPI

    Hi Friends,
    1.     Is it possible to call custom designed RFC function module, apart from BAPI.
    2.     Why we call it Adaptive RFC layer, Since every time the JCO layer updated with SAP, Why can’t be dynamic.
    Thanx for Ur time.
    Cheers,
    Sam

    Also check <a href="http://help.sap.com/saphelp_nw04/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm">here</a> for more information on aRFC. Here you can find why it is called adaptive.
    Regards,
    Christophe

  • How to convert a Tcode into Function module or a Bapi

    Dear all,
    i would like to convert Tcode : ME21N into a Function module or a Bapi to create a Webservice.
    Kindly help me..!!
    Thanks in advance..
    SreeKumar..

    Hey,
    Is the existing BAPI  'BAPI_PO_CREATE1' not sufficient for your needs?
    Till now never had to do something with webservices but this service ...maybe it does exist already...
    seems a likely candidate to be converted by SAP. So you do no need to re-invent the wheel again...and again...
    Cheers,
    BV.

  • Function module or any BAPI that lets park the document in the transaction

    Function module or any BAPI that lets park the document in the transaction FBV1.
    I need to park the invoice by providing some test value in FBV1. I want to know is there any function module or BAPI that is used to park the doucument in transaction FBV1

    hi,
    Use the BAPI BAPI_INCOMINGINVOICE_PARK to park the Document
    Regards
    Sudheer

  • Documentation Required  for Function Module

    Hi,
    Can Provide me the documentation how to create function module in ABAP.
    Regards
    Ravi

    hi,
    BAPI Step by step Guidance
    BAPI stands for Business Application Programming Interface.
    There are 5 different steps in BAPI.
    - Create BAPI Structure  
    - Create BAPI Function Module or API Method.  
    - Create BAPI object  
    - Release BAPI Function Module.  
    - Release BAPI object.
    Step1. Creating BAPI Structure:  
    - Go to <SE11>. 
    - Select Data Type & Enter a name. 
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module: 
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
       Goto -> Function Groups -> Create Group.
       Enter a name (ZBAPI)
       Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
       Click on the Third ICON that says Inactive Objects. 
       Select the group that you just created and click on Activate. 
       Notice that the group you created will disappear from the list of inactive objects.
    - Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box u2018Pau2019. All remotely enabled functional modules MUST be Pa enabled, where Pa means u2018Passed by Valueu2019 and if you donu2019t select u2018Pau2019, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields 
      RETURN        TYPE        BAPIRETURN (These 3 field values are always same)
      Here also select u2018Pau2019 meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Ram  .
    Edited by: Ramakullay Challa on Jun 2, 2009 10:31 AM

  • Could i use the function module in my BAPI

    Hi,
    guys i am confused, can i use the standard function module which has not been released, in my BAPI.
    BAPI is used for cross applications.
    regards,
    chinta

    Hi Chinta
    It is not advisable to use a not released Function Module for any business purpose, as there is always a chance that, the function module may get changed. So it is better to create a custom function module and use it.
    Thanks and regards,
    Rinzy Deena Mathews.

  • Generic Extraction business Requirement, through function module,

    Generic Extraction business Requirement, specifically through function module and source code in function module.

    Dear Karthik,
    Go to transaction SBIW -> Generic Datasource -> Maintain Generic Datasources -> Choose Master/Transaction Data -> Maintain proper entries (Application Component, Descriptions) -> Extraction by FM if you want to extract using FM.
    Maintaining Generic DataSources - Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
    Creating a Generic DataSource
           1.      Select the DataSource type and give it a technical name.
           2.      Choose Create. The creating a generic DataSource screen appears.
           3.      Choose an application component to which the DataSource is to be assigned.
           4.      Enter the descriptive texts. You can choose any text.
           5.      Choose from which datasets the generic DataSource is to be filled.
                                a.      Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
                                b.      Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    After generation, you now have a DataSource whose extract structure matches the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
                                c.      Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    For information about the function library, see the ABAP Workbench: Tools documentation.
                                d.      With texts, you also have the option of extraction from domain fixed values.
    Maintain the settings for delta transfer where appropriate.
           7.      Choose Save.
    Note when extracting from a transparent table or view:
    If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
    A screen appears in which you can edit the fields of the extract structure.
           8.      Editing the DataSource:
           Selection
    When scheduling a data  request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
           Hide field
    You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
           Inversion
    Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
    Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by –1) into BW.
           Field only known in exit
    You can enhance data by extending the extract structure for a DataSource using fields in append structures.
    The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
    Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
    9. Choose DataSource -> Generate.
    The DataSource is now saved in the source system.
    Maintaining Generic DataSources
    ·        Change the DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource  -> Generate.
    If you want to test extraction in the source system independently of a BW system, choose DataSource  ->  Test Extraction.
    ·        Delta DataSource
    In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
    Also visit :[Data Extraction from SAP Source System | http://help.sap.com/saphelp_nw04/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm]
    Regards,
    Naveen.

  • Spool number required in Functional Module for BTE

    Hello all,
    As per client requirement to store dunning data into one Z table and send the same to third part.
    For this  we are planning to  using BTE.
    To update the data in Z table we need spool number. But that spool number is not available in sample functional module.
    Spool number is available in structure ITCPP but in our functional module available structure is ITCPO.
    Please suggest available alternative solutions to proceed further.
    Thanks in advance.
    Amar.

    Hello experts,
    Could you please let me know which Business transaction events we can use for Remittence advice and Customer statement.
    My requiremnt is to update data in Z table including spool data.
    Quick response is highly appreciable with points.
    Thanks & regards,
    Amar.

  • Require a function module to add days to a date?

    My purpose is to add days to a particular date and get the resulting date. I tried using this function module "RP_CALC_DATE_IN_INTERVAL", but the problem is this function module only accepts two digits for days. i.e. i am only able to add a maximum of 99 days to a particular date, but i do want to go further and add more so please tell me if there is any function module which shall help me add 3 digit days to a date.

    Hi Kiran,
    You can directly add days to the date.
    Eg:
    DATA date LIKE sy-datum.
    DATA days TYPE i.
    date = sy-datum.
    days = 100.
    date = date + days.
    WRITE date.
    Regards
    Wenceslaus

  • Require a Function Module

    Hi,
    Please give me the function module name which converts the date from internal format (YYYYMMDD) TO (MMDDYYYY).
    Regards
    Reddy

    So if you user settings are set as MM/DD/YYYY, then you can do this.
    REPORT  ZRICH_0001.
    data: datum type sy-datum.
    data: datum_out(10) type c.
    datum = sy-datum.
    call function 'CONVERT_DATE_TO_EXTERNAL'
    EXPORTING
        DATE_INTERNAL                  = DATUM
      IMPORTING
        DATE_EXTERNAL                  = datum_out.
    write:/ datum_out.
    If you don't want the '/' in the datum_out, you can do this.
    REPORT  ZRICH_0001.
    data: datum type sy-datum.
    data: datum_out(10) type c.
    datum = sy-datum.
    call function 'CONVERT_DATE_TO_EXTERNAL'
    EXPORTING
        DATE_INTERNAL                  = DATUM
      IMPORTING
        DATE_EXTERNAL                  = datum_out.
    <b>translate datum_out using '/ '.
    condense datum_out no-gaps.</b>
    write:/ datum_out.
    If you want to force the formatting regardless of user setting, you can do this.
    REPORT  ZRICH_0001.
    data: datum type sy-datum.
    data: datum_out(10) type c.
    datum = sy-datum.
    concatenate sy-datum+4(2) sy-datum+6(2) sy-datum+0(4)
           into datum_out SEPARATED BY '/'.
    write:/ datum_out.
    If you don't want the '/', then simply remove the SEPARATED BY '/'.
    REPORT  ZRICH_0001.
    data: datum type sy-datum.
    data: datum_out(10) type c.
    datum = sy-datum.
    concatenate sy-datum+4(2) sy-datum+6(2) sy-datum+0(4)
           into datum_out.
    write:/ datum_out.
    Regards,
    Rich Heilman

  • Require a function module to calculate sum of the quantity based on GRNDATE

    hi friends,
    I need to calculate the sum of the quantity based on GRN DATE and invoice date.
    the invoice date given in select-options should be captured by program and from the previous day it need to retrieve the GRN dates and corresponding quantities and i need to do the summation of all these quantities can anybody tell any function module.
    Thanks in advance.

    Try function MD_CONVERT_MATERIAL_UNIT
    the table of UOM's is MARM.
    Doug

  • Can any one suggest me a function module or BAPI for the below requirement.

    Hi all,
    I have a requirement in which i need to send an IDoc for each item of  the delivery document linked to the shipment document.
    previously i have called the function module in a BADI, but now the requirement has changed.No BADI or USEREXIT has to be used.Instead i need to create a custom program and call the function module in a form in the program.My doubt is how can i get the tables needed in the function module from the program? previously i got the tables as online parameters in the BADI.
    the function module will be trigerred at the time of saving of the document.
    I understand that i need to pass the tables in the program, but is there any way (function module or a BAPI) that can be used to directly get the data of the BADI?
    please help me as soon as possible.

    hi,
    my transaction is VL02N change outbound delivery.

  • Function module/BAPI for executing VD51/VD52 transactions

    Hi
    Warm greetings to all,
    I require a function module/BAPI for executing VD51/VD52 transactions. Can anyone help on this
    Sreekanth

    Hi Sreekanth,
    Use this.
    There is an FM which is used by standard transaction
    'RV_CUSTOMER_MATERIAL_UPDATE' .
    Ex Code -
    CALL FUNCTION 'RV_CUSTOMER_MATERIAL_UPDATE'
    IN UPDATE TASK
    TABLES
    XKNMT_TAB = XKNMT
    YKNMT_TAB = YKNMT
    TCATALOG_TAB = LT_CATALOG.
    commit work.
    Regards,
    Vijay

  • Steps for creating a new BAPI function module

    Hello experts,
    Can any one send me steps for creating a new BAPI function module , I got a requirement to do like this,but I dont have any clue about how to create.
    Please help !!!

    BAPI stands for Business Application Programming Interface.
    There are 5 different steps in BAPI.
    - Create BAPI Structure  
    - Create BAPI Function Module or API Method.  
    - Create BAPI object  
    - Release BAPI Function Module.  
    - Release BAPI object.
    Step1. Creating BAPI Structure:  
    - Go to <SE11>. 
    - Select Data Type & Enter a name. 
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module: 
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
       Goto -> Function Groups -> Create Group.
       Enter a name (Note: This name Must start with ZBAPI)
       Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
       Click on the Third ICON that says Inactive Objects. 
       Select the group that you just created and click on Activate. 
       Notice that the group you created will disappear from the list of inactive objects.
    - Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields 
      RETURN        TYPE        BAPIRETURN (These 3 field values are always same)
      Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object: 
    - Enter Tr.Code <SWO1>   (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details. 
    NOTE: Make sure that that Object Type and Program name are SAME.   
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom. 
    - Then hit <ENTER>. 
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu: 
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step. 
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    -  Now on a different screen goto TR.CODE <SE37>.  Enter Function Module name and select from the top menu  Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>. 
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully.
    regards,
    aswin

  • BAPI or Function module to park FI Invoice

    Hi All,
    I have been trying hard to find a Function Module or a BAPI to park a vendor Invoice. Do rememeber that I am using the transaction FV60 for this purpose and not MIRO. For MIRO you have the BAPI_INCOMINGINVOICE_CREATE. But for the FI vendor invoice I am finding hard to find a function module. I have as of now using a BDC but the customer needs to upload 500 invoices and it is very slow. The reason why I need a banckground process is because there is a report in conjunction with the upload program which actually gives the status of all the Invoices and to whom it has been assigned to for processing.
    I have a workflow running behind this and report is about the workflow.
    I would appreciate if somebody could help me out here
    Cheers,
    Sudhi

    Hi All,
    Thanks a lot to all for providing me the inputs but all the Function modules that are mentioned are for the MM Invoice that you create through transaction MIRO or MIR7. I need a functin module that can park an invoice through transaction FV60. Any inputs will be appreciated.
    Cheers,
    Sudhi

Maybe you are looking for

  • Error when adding an Object to the server via CMS

    I am trying to upload a new report to the server via CMS. I click on Objects > Browse for the report > Click Submit After a few seconds, I get the following error: There was an error while writing data back to the server: File Repository Server error

  • What is the correct syntax to have the report log into different databases?

    Hi, My current Oracle Reports are called against several databases, depending on region. I pass 'userid=reports/new1@tsoc' as one of teh parameters to access the 'tsoc' db. I just as well call 'userid=reports/new1@penang'. This syntax does not appear

  • CIN Config

    Hi Friends , I had configared CIN for vendor and material details in chapter ID , but when i do GR with reference to perticular PO nummber , the excise tab is not appearing . Firest time i am working on CIN , configarion . I don't have overall idea o

  • Error in MDDataSetBW.GetCellData. Unknow error (WIS 10901)

    Hello to Everybody, We are working with Business Objects EDGE series XI 3.0 and SAP BW 3.5. We work over Financial Infocubes.  Our problem appears when we try to refresh a Profit & (Loss) (CO-PA Query) with more than two periods of time.  If we work

  • P67A-GD65(B3) and freezes during boot, or rare reset

    Hi, I've got stupid issue. My mobo is rock solid under: * few Windowses (7/8/XP) * few Linuxes (Mandriva, Mageia, Ubuntu - in 32 and 64-bit revisions) * UEFI BIOS. But I've noticed it sometimes freezes on.. GRUB (ver 2, installed by Ubuntu) - when I