Help in BAPI

Hi Experts,
   I want to create a cutomize BAPI.That has to show all content of CDCHR & CDPOS table. Input parameters are Transaction Code (CDHDR.TCODE) & date (CDHDR.UDATE).
   Can anyone help me to do this.
with regadrs,
Silviya T

Hi,
Create the function module (using SE37) with your functionality. (Select statement).
Using SWO1 create the business Object, with method with any name, eg get_CDHDR data etc. The method should be configured to point to ABAP (tab) and function module or API function) pointing to earlier FM.
Then assign the function module to method of your Business Object.
Done, your code is now ready.
Regards
Kiran

Similar Messages

  • Hi i need help on BAPI to Update the ADRT & ADR6 tables

    hi,
    i need help on BAPI to Update the ADRT & ADR6 tables
    these are the fields to be updated
    ADRT-Remark Table
    ADR6-SMTP_ADDR
    ADR6-DFT_RECEIV
    Please guide me what parameters to be passed to update
    ADR6 & ADRT tables

    Look at this function Group
    <b>BUBA_3                         SAP BP: External BAPI Function Modules     </b>                        
    BAPI_BUPA_ADDRESS_ADD          SAP BP, BAPI: Add Address                                          
    BAPI_BUPA_ADDRESS_CHANGE       SAP BP, BAPI: Change Address                                       
    BAPI_BUPA_ADDRESS_GET_NUMBERS  SAP BP, BAPI: Read Address Numbers                                 
    BAPI_BUPA_ADDRESS_GETDETAIL    SAP BP, BAPI: Read Address                                         
    BAPI_BUPA_ADDRESS_REMOVE       SAP BP, BAPI: Delete Address                                       
    BAPI_BUPA_ADDRESSES_GET        SAP BP, BAPI: Determine All Addresses                              
    BAPI_BUPR_CONTP_ADDR_ADD       SAP BP, BAPI: Add Contact Person Relationship Address              
    BAPI_BUPR_CONTP_ADDR_CHANGE    SAP BP, BAPI: Change Contact Person Relationship Address           
    BAPI_BUPR_CONTP_ADDR_GETDETAIL SAP BP, BAPI: Read Contact Person Relationship Addresses           
    BAPI_BUPR_CONTP_ADDR_REMOVE    SAP BP, BAPI: Delete Contact Person Relationship Address           
    BAPI_BUPR_CONTP_ADDRESSES_GET  SAP BP, BAPI: Read Contact Person Relationship Addresses           
    BAPI_BUPR_EMPLO_ADDR_ADD       SAP BP, BAPI: Add Employee Relationship Address                    
    BAPI_BUPR_EMPLO_ADDR_CHANGE    SAP BP, BAPI: Change Employee Relationship Address                 
    BAPI_BUPR_EMPLO_ADDR_GETDETAIL SAP BP, BAPI: Read Employee Relationship Address                   
    BAPI_BUPR_EMPLO_ADDR_REMOVE    SAP BP, BAPI: Delete Employee Relationship Address                 
    BAPI_BUPR_EMPLO_ADDRESSES_GET  SAP BP, BAPI: Read Contact Person Relationship Addresses           
    Look also at OSS <a href="https://service.sap.com/sap/support/notes/306275">Note 306275 - Transferring address data</a>
    Regards

  • Lsmw with help of bapi

    Hi All
    i am doing LSMW with help of BAPI for transaction mm01. Initially i used the bapi name "bapi_standardmaterial_create" but it do not allow me for any method like create, edit etc. then i used the bapi name "bapi_material_savedata" but i do not get the "Business object name " and method name for this bapi.can anyone guide me how to do that.
    And if anyone has the documet regarding steps follow in the lsmw with bapi with configuratin then please tell me.

    Hi
    Please check these threads
    Re: LSMW with BAPI and IDOC
    https://forums.sdn.sap.com/click.jspa?searchID=292418&messageID=2532904
    https://forums.sdn.sap.com/click.jspa?searchID=292418&messageID=2796820
    https://forums.sdn.sap.com/click.jspa?searchID=292418&messageID=2549249
    https://forums.sdn.sap.com/click.jspa?searchID=292418&messageID=2545661

  • Urgent help in BAPI

    Hello All,
    My requirement - A new field ZLGCYPO - CHAR(10) is added to existing EKKO structure. Now I want to update the field for a given PO using BAPI. Can anyone pls help me in solving this?

    Hi,
      use the BAPI BAPI_PO_CHANGE to update the custom field.
      Extend the structure BAPI_TE_MEPOHEADER with the custom field..
      Use EXTENSIONIN structure to populate the custom field.
    Thanks,
    Naren

  • Help:  Exposing BAPI's as Web Services in WAS 6.20

    Hello,
    I'm very new to WAS and I don't have access to a development environment yet (network issues).  I was hoping someone might be able to shed some light on the following: 
    I'd like to expose certain BAPI's as Web Services in a way that my .NET client can talk SOAP directly to WAS 6.20 (without having to generate proxies). Is this possible? 
    Also, is there a Web Service Creation Wizard in 6.20 that makes the process of exposing BAPI's simple, similar to the wizard in 6.40?  To date I've been able to navigate the BOR and generate WSDL for the BAPI's that I'm interested in however, this doesn't get me all the way there.  I'm looking for documentation on how to make the Web Service interface for those BAPI's generally available through WAS.
    I'll take anything at this point.  Even a pointer to some documentation.
    Thanks,
    Jay

    Hi Jay,
    Yes, it is possible in Web AS 6.20 to expose BAPIs as Web services. You find the exact documentation of how to do this in the SAP Service Marketplace: http://service.sap.com/connectors. Then go to "SOAP Processor" --> "Media Library". However, the wizard that helps you create the Web service is not yet available in 6.20.
    Regards,
    Susanne

  • Urgently needed help in BAPI

    hello everybody,
    I have a BAPI called "CreateFromData" for business object called 'SalesOrder'.
    i want to use this BAPI in Java(developer studio).
    we can use this method to create sales orders.
    A sales order contains information about prices, quantities and dates.
    A sales order consists of several items that contain the quantity of the material or service specified for the order.
    we have to enter item data required for  using the above BAPI using ORDER_ITEMS_IN table(this is a parameter for the above mentioned method).
    how to enter data into this parameter(table) from java...i know that we have to use Jco but how to use it i donot know....i mean how to give parameter values to these methods in java?
    pls help me reagarding this problem...
    thx in advance,
    bye,
    aj.

    Hi Ajay,
    Yake this code to call your BAPI from your JAVA class.
    This is the sample program for BAPI "BAPI_SALESORDER_GETLIST"
    import com.sap.mw.jco.*;
    public class Example2 {
      // The MySAP.com system we gonna be using
      static final String SID = "R3";
      // The repository we will be using
      IRepository repository;
      public Example2()
        try {
          // Add a connection pool to the specified system
          //    The pool will be saved in the pool list to be used
          //    from other threads by JCO.getClient(SID).
          //    The pool must be explicitely removed by JCO.removeClientPool(SID)
          JCO.addClientPool( SID,         // Alias for this pool
                             10,          // Max. number of connections
                             "000",       // SAP client
                             "johndoe",   // userid
                             "*****",     // password
                             "EN",        // language
                             "appserver", // host name
                             "00" );
          // Create a new repository
          //    The repository caches the function and structure definitions
          //    to be used for all calls to the system SID. The creation of
          //    redundant instances cause performance and memory waste.
          repository = JCO.createRepository("MYRepository", SID);
        catch (JCO.Exception ex) {
          System.out.println("Caught an exception: \n" + ex);
      // Retrieves and prints information about the remote system
      public void systemInfo()
        try {
          // Get a function template from the repository
          IFunctionTemplate ftemplate = repository.getFunctionTemplate("RFC_SYSTEM_INFO");
          // if the function definition was found in backend system
          if(ftemplate != null) {
            // Create a function from the template
            JCO.Function function = ftemplate.getFunction();
            // Get a client from the pool
            JCO.Client client = JCO.getClient(SID);
            // We can call 'RFC_SYSTEM_INFO' directly since it does not need any input parameters
            client.execute(function);
            // The export parameter 'RFCSI_EXPORT' contains a structure of type 'RFCSI'
            JCO.Structure s = function.getExportParameterList().getStructure("RFCSI_EXPORT");
            // Use enumeration to loop over all fields of the structure
            System.out.println("System info for " + SID + ":\n" +
            for (JCO.FieldIterator e = s.fields(); e.hasMoreElements(); ) {
              JCO.Field field = e.nextField();
              System.out.println(field.getName() + ":\t" + field.getString());
            }//for
            System.out.println("\n\n");
            // Release the client into the pool
            JCO.releaseClient(client);
          else {
             System.out.println("Function RFC_SYSTEM_INFO not found in backend system.");
         catch (Exception ex) {
           System.out.println("Caught an exception: \n" + ex);
      // Retrieves and displays a sales order list
      public void salesOrders()
         JCO.Client client = null;
        try {
          // Get a function template from the repository
          IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_SALESORDER_GETLIST");
          // if the function definition was found in backend system
          if(ftemplate != null) {
              // Create a function from the template
              JCO.Function function = ftemplate.getFunction();
              // Get a client from the pool
              client = JCO.getClient(SID);
              // Fill in input parameters
              JCO.ParameterList input = function.getImportParameterList();
              input.setValue("0000001200", "CUSTOMER_NUMBER"   );
              input.setValue(      "1000", "SALES_ORGANIZATION");
              input.setValue(         "0", "TRANSACTION_GROUP" );
              // Call the remote system
              client.execute(function);
              // Print return message
              JCO.Structure ret = function.getExportParameterList().getStructure("RETURN");
              System.out.println("BAPI_SALES_ORDER_GETLIST RETURN: " + ret.getString("MESSAGE"));
              // Get table containing the orders
              JCO.Table sales_orders = function.getTableParameterList().getTable("SALES_ORDERS");
              // Print results
              if (sales_orders.getNumRows() > 0) {
                // Loop over all rows
                do {
                  System.out.println("----
                  // Loop over all columns in the current row
                  for (JCO.FieldIterator e = sales_orders.fields(); e.hasMoreElements(); ) {
                     JCO.Field field = e.nextField();
                     System.out.println(field.getName() + ":\t" + field.getString());
                  }//for
                } while(sales_orders.nextRow());
              else {
                System.out.println("No results found");
              }//if
          else {
             System.out.println("Function BAPI_SALESORDER_GETLIST not found in backend system.");
           }//if
        catch (Exception ex) {
          System.out.println("Caught an exception: \n" + ex);
        finally {
           // Release the client to the pool
          JCO.releaseClient(client);
      protected void cleanUp() {
        JCO.removeClientPool(SID);
      public static void main(String[] argv)
        Example2 e = new Example2();
        e.systemInfo();
        e.salesOrders();
        e.cleanUp();
    regards,
    Bhavik

  • Change parked document with the help of BAPI

    Hi All,
    I am creating a new process where in, i start with parking a JV type document via portal. I used a BAPI for parking the document and it worked
    I am not able to find a BAPI to change the parked document via portal.
    I tried using the below BAPI's for chaning the parked document, but it did not work out.
    1. PRELIMINARY_POSTING_UPDATE
    2. PRELIMINARY_POSTING_UPDATE_ENJ
    Any help highly appreciated.
    Best Regards,
    Raj

    Hi Raj
    I research but there are no BAPIs available for G/L parked documents.
    A search via trans SE37 using function module BAPI* indicates the following BAPIs are available for G/L documents:                                                                               
    BAPI_ACC_GL_POSTING_CHECK    Accounting: General G/L Account Posting   
    BAPI_ACC_GL_POSTING_POST     Accounting: General G/L Account Posting   
    The following BTEs are available for parked documents via trans BERP:  
    00002210 DOCUMENT PARKING: Amount release                              
    00002211 DOCUMENT PARKING: Account assignment approval                 
    00002212 DOCUMENT PARKING: Determine accounting clerk                  
    00002220 DOCUMENT POSTING: Det. person with release author             
    Unfortunately SAP do not offer BAPIs for parking documents.
    Kind Regards
    davide

  • Need help on BAPI - BAPI_ACC_BILLING_POST

    Hi,
    When I run the BAPI (BAPI_ACC_BILLING_POST), it gives an error "Item category 04000 not allowed in accounting transaction 0200/0001"
    Please help me with the error. PLease tell me what that means and what needs to be done to corret it...
    Thanks...
    Uma.

    What is the long text?
    Rob

  • Help with bapi / Function module

    Can anybody please provide me a sample source code or example on how to use the function module BAPI_BILLINGDOC_CREATEMULTIPLE for creating billing document?
    Thanks in advance,
    Krishen

    hi
    hope the following helps u to know what is to be passsed.
    1.  Required entries     :
          BILLING_DATA_IN-SALESORG
          BILLING_DATA_IN-DISTR_CHAN
          BILLING_DATA_IN-DIVISION
          BILLING_DATA_IN-DOC_TYPE
          BILLING_DATA_IN-ORDBILLTYP
          BILLING_DATA_IN-SOLD_TO
          BILLING_DATA_IN-ITEM_CATEG
          BILLING_DATA_IN-REQ_QTY
          BILLING_DATA_IN-SALES_UNIT
          BILLING_DATA_IN-CURRENCY
          If a material is billed for which a material master needs to be
          determined (BILLING_DATA_IN-NO_MATMAST = ' '), you must make the
          following entries :
          BILLING_DATA_IN-PLANT
          BILLING_DATA_IN-MATERIAL
          If, on the other hand, a material is billed for which no material
          master is to be determined (BILLING_DATA_IN_NO_MATMAST = 'X'), you
          must make the following entries :
          BILLING_DATA_IN-COUNTRY
          BILLING_DATA_IN-MATERIAL
          BILLING_DATA_IN-TAXCL_1MAT
    2.  COMMIT control :
          In the update run (TESTRUN = ' ')  the update is carried out by
        COMMIT
          WORK as part of the method available.

  • Help in bapi PO

    hi
    i look for  2 bapi or fm that i can copy purchase order and than to change some field in the purchase order.
    Thanks
    Have a nice day

    Hi,
    I think you can use
    BAPI_PO_CHANGE
    Pass you purchase order and other fields to change the data relevant to PO.
    rewards if useful,
    regards,
    nazeer

  • Help in bapi bapi_outb_delivery_change

    Hi
    i want to use extension in the bapi bapi_outb_delivery_change
    but i don't unserdatns how to do it.
    Maybe you can send me an example how to do it!!!!
    Thanks
    Have a nice day

    Hi,
    BAPI_OUTB_DELIVERY_CHANGE
    Regards
    Sudheer

  • Need Some help on BAPI

    Hello;
        I am new to BAPI programming..Till now i have created the BPAI which can be called Remotely.Now i want to put dtat in BAPI hard codedly...Can anyone throw some light on this...
    Thanks and Regards
        Omkar.
    Moderator message: please search for available information and SAP documentation before asking, warning #3
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    locked by: Thomas Zloch on Sep 28, 2010 9:52 AM

    Hi,
    BAPI is nothing but a function module and also RFC enabled. So u can call that fm from outside SAP. U can call that BAPI using some logic or u can make hardcoding the parameters, its depends mainly on ur requirement.
    Regards
    Amitava

  • Urgent Help on BAPI's?

    I have a problem with BAPI's.
    When i trying to give the BP Intial(like TMK,RRRBD..) of BP.its going to DUMP.
    When i give the BP no( its running properly).
    I am using the FM BAPI_ACTIVITYCRM_CREATEMULTI.
    In the DUMP its showing Error in Header regarding length.
    This is the Select stament :
    SELECT SINGLE PARTNER INTO ACC_MGR FROM BUT000
        WHERE BU_GROUP EQ 'ZEMP' AND INITIALS EQ IACC_MGR .
      IF SY-SUBRC NE 0.
         MESG = 'INVALID ACCOUNT MANAGER'(022).
         ENDIF.
      SELECT SINGLE PARTNER INTO PERSON_RESP FROM BUT000
        WHERE BU_GROUP EQ 'ZEMP' AND INITIALS EQ IPERSON_RESP .
      IF SY-SUBRC NE 0.
         MESG = 'INVALID PERSON RESPONSIBLE'(023).
         ENDIF.
      CHECK MESG IS INITIAL.
    Header values which i given :
    HEADER VALUES ****
    HEAD-GUID = NEW_GUID.
    HEAD-PROCESS_TYPE = 'ZLBA'.
    HEAD-DESCR_LANGUAGE = 'EN'.
    HEAD-LANGU_ISO = 'EN'.
    HEAD-DESCRIPTION = 'CTSXXXXCUSTNAME'.
    HEAD-POSTING_DATE = SY-DATUM.
    HEAD-STATUS_SINCE = SY-DATUM.
    APPEND HEAD.
    Early reply is highely appriciable.
    Regards,
    Chow.

    I have a problem with BAPI's.
    When i trying to give the BP Intial(like TMK,RRRBD..) of BP.its going to DUMP.
    When i give the BP no( its running properly).
    I am using the FM BAPI_ACTIVITYCRM_CREATEMULTI.
    In the DUMP its showing Error in Header regarding length.
    This is the Select stament :
    SELECT SINGLE PARTNER INTO ACC_MGR FROM BUT000
        WHERE BU_GROUP EQ 'ZEMP' AND INITIALS EQ IACC_MGR .
      IF SY-SUBRC NE 0.
         MESG = 'INVALID ACCOUNT MANAGER'(022).
         ENDIF.
      SELECT SINGLE PARTNER INTO PERSON_RESP FROM BUT000
        WHERE BU_GROUP EQ 'ZEMP' AND INITIALS EQ IPERSON_RESP .
      IF SY-SUBRC NE 0.
         MESG = 'INVALID PERSON RESPONSIBLE'(023).
         ENDIF.
      CHECK MESG IS INITIAL.
    Header values which i given :
    HEADER VALUES ****
    HEAD-GUID = NEW_GUID.
    HEAD-PROCESS_TYPE = 'ZLBA'.
    HEAD-DESCR_LANGUAGE = 'EN'.
    HEAD-LANGU_ISO = 'EN'.
    HEAD-DESCRIPTION = 'CTSXXXXCUSTNAME'.
    HEAD-POSTING_DATE = SY-DATUM.
    HEAD-STATUS_SINCE = SY-DATUM.
    APPEND HEAD.
    Early reply is highely appriciable.
    Regards,
    Chow.

  • F4 help for BAPI

    how can i implement it in a program?
    Thanks

    using call funcation.
    se37 bapi* see bapi program.
    call that  report.

  • Help with bapi

    Hi experts,
    I am trying to use a BAPI 'BAPI_INCOMINGINVOICE_CREATE' to post in MIRO based on the service entry sheet and also update the condition rates. Is it possible through this BAPI? If anybody has done this before, please provide a sample code for this.
    Thanks

    CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
           EXPORTING
                headerdata       = gs_header
           IMPORTING
                invoicedocnumber = gv_invno
                fiscalyear       = gv_fcl_yr
           TABLES
                itemdata         = gt_itemdata
                taxdata          = gt_taxdata
                return           = gt_return.
      LOOP AT gt_return WHERE type = 'E' OR
                              type = 'A'.
        EXIT.
      ENDLOOP.
    Pass the header data , tax data fields & item data.

Maybe you are looking for

  • Creating spot color in Illustrator CS4 js

    Hi, I need to create spot color in Illustrator CS4 with js, with assigned name and color values. Here what I have: myColor = myDoc.spots.add({name:"FOIL", colorValue:[10, 0, 100, 0]}); But it comes out as process instead of spot and the color is not

  • 4010_850 EDI file Generation issue.

    Hi All, We are facing issue in converting 850 EDI XML to EDI file. We could generate a simple EDI based on mandatory elements. But when we try to provide DTM and AMT values , We are hitting below issues.. I am missing some basic stuff. Please find th

  • Stream switching?

    hello everyone, i�ve a question: righ tnow i�m working on a program to a stream from an analog tv tuner card, everything works fine, just for the fact, that the only signal (stream) comes from the composite input stream. so how can a switch to the ot

  • Cisco Prime Collaboration Provisioning?

    What is  Cisco Prime™ Collaboration Provisioning?

  • Strange benchmark result need some explanation

    I was testing the efficiency of the transpose function in Labview so I did a simple test setup starting with by using a constant as source. At some time I changed the constant to a control, and the processing time dropped from about 4200 msec to a nu