Question conserning a remote-enabled BAPI

I have created a quick and 'easy' BAPI that will return a table of shipping document numbers.  The code is below:
FUNCTION z_bapi_likp_get_list.
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(ZBAPI_DELIVERY_DOC_IMPORT) TYPE  ZBAPI_DELIVERY_DOC_IMPORT
*"  EXPORTING
*"     VALUE(ZBAPI_DELIVERY_DOC_EXPORT) TYPE  ZBAPI_DELIVERY_DOC_EXPORT
*"     VALUE(RETURN) TYPE  BAPIRETURN
  SELECT vbeln FROM likp INTO zbapi_delivery_doc_export
    WHERE lddat = zbapi_delivery_doc_import-lddat AND
          vstel = zbapi_delivery_doc_import-zzvstel.
  ENDSELECT.
ENDFUNCTION .
ZBAPI_DELIVERY_DOC_IMPORT is a structure that contains two fields: LDDAT and VSTEL
ZBAPI_DELIVERY_DOC_EXPORT is a structure that contains one field: VBELN.  I tried to follow  and it seemed to work great but I have a slight 'problem'.
I need to include the leading zeros on the document numbers.  I tried to loop through the structure (after the select) and append the zeros that way but it wasn't allowing me to loop through the structure.  Does anybody have any ideas/suggestions?<a href="http://www.erpgenie.com/abap/bapi/example.htm">this step-by-step example</a>

Well first of all,  if  ZBAPI_DELIVERY_DOC_EXPORT is not a table type, then you are not getting an internal table back from the BAPI, it is a single line, or structure, which is why you can't loop at it.   If you want to return this as a table, then you need to either make ZBAPI_DELIVERY_DOC_EXPORT a table type, or use this in the TABLES parameter tab when defining the function module(BAPI) in SE37.  Right now it is defined as an EXPORTING paramter.
As far as the leading zeros are concerned, you should be getting the leading zeros, but you may want to code your select like this.
  Select vbeln from likp into corresponding fields of table
                        zbapi_delivery_doc_export
                       WHERE lddat = zbapi_delivery_doc_import-lddat AND
                                     vstel = zbapi_delivery_doc_import-zzvstel.
Of course this coding will only work after you have adjusted the ZBAPI_DELIVERY_DOC_EXPORT parameter.
Regards,
RIch Heilman

Similar Messages

  • Remote-Enabled BAPI/RFC for creating "Request Special Payment (SPSP)"

    Is there any Remote-Enabled BAPI/RFC for creating "Request Special Payment (SPSP)" which is one of the Personnel Change Requests under MSS ?
    Thanks.

    closing to post another question.

  • Remote-enable bapi to upload employee photos

    hi,all
    i need to upload emplyee photos from another application system to sap,but i have no idea about such remote-enable bapi.
    can anybody show me one?
    Regards
    Darell

    hi,all
    i need to upload emplyee photos from another application system to sap,but i have no idea about such remote-enable bapi.
    can anybody show me one?
    Regards
    Darell

  • Remote enabled BAPI/RFC to create VACANCY in Recruitment

    Is there any Remote enabled BAPI/RFC to create VACANCY in Recruitment?
    I need to create VACANCY from external .Net program.
    Thanks.

    closing to post another question

  • Remote enabled BAPI/RFC to upload a Resume

    Is there any Remote enabled BAPI/RFC to upload a Resume and how to assign it to Applicant ?
    I need to upload Resume from a .Net program and assign it as attachment or otherwise to Applicant.

    The reason for posting it here is this:
    I used Remote Enabled FM BDS_BUSINESSDOCUMENT_CREATEF to create an attachment (.DOC word document) to APPLICANT Object. It works fine when executed from SE37.
    When I execute(call) from .Net code, I get exception "ERROR_KPRO".
    So I am looking for ANY way to attach or send Resume document into SAP and some how associating it with APPLICANT object, either by solving ERROR_KPRO or by suggesting any other way...
    Thanks for the response

  • Standard remote enabled bapi for creation of purchaser contract in srm

    Hello Friends
    Plz tell me is there any standard,remote enabled FM/BAPI in SRM system for creation of purchaser contract.
    I found BBP_PD_CTR_CREATE. But this is normal FM.
    I need BAPI like BAPI_CONTRACT_CREATE which there in ECC system.
    Plz help.
    Thanks & regards,

    One idea is to write a wrapper FM that is remote enabled and internally call BBP_PD_CTR_CREATE for your own use.

  • Difference between BAPI and remote enabled function module

    Hi!
    what is the difference between remote enabled function module and
    BAPI.
    How do we use remote enabled function module .
    thanks
    Amit

    Please search the forum before asking basic questions.

  • Difference between BAPI Function Module and Remote Enable Function Module

    Dear Experts,
        I want to know the main difference between BAPI Function Module and Remote Enable Function Module ?
    One main difference that I know is BAPI FM are declared in Methods of Business Object  ie BAPI are methods of BOR where as Remote Enabled FM are not. What are other differences? Is it possible to convert a Remote Enable FM to BAPI FM .
    regards
    Manish

    Hello,
    Did u create any ZBAPI?
    The Procdure for Creating the Customer BAPI is Create a Remote Enabled Function module and then goto the tcode BAPI.
    Once u go in to that just take the Project tab and enter the details.
    by this way u can create a Customer BAPI.
    With Regards,
    Sumodh.P

  • Remote-Enabled Function Modul G/L Accounts

    Hi!
    I am looking for remote-enabled function moduls (or BAPIs) to create and change G/L Accounts. There are two function moduls which seems perfect (GL_ACCOUNT_INSERT and GL_ACCOUNT_UPDATE) but these two are not remote-enabled.
    Does anyone know some alternatives that i missed?
    Thanks in advance,
    Frank!

    Hi.
    Look at this function module
    BAPI_ACC_GL_POSTING_POST

  • Can we call Remote Endable Module  from another Remote Enabled Moduel

    Hii experts...
    I have a problem regarding Remote Enabled Module Function Module....
    Actually i want to call the standard BAPI 'BAPI_GL_GETGLACCBALANCE' into the BAPI which i hve created...
    is it possible???
    or can anyone tell me if it is not possible then what is the alternative for this..???

    'Remote enabled' means that you can also call the function remotely. The 'Remote enabled' characterstic implies some restrictions for the FMs interface, i.e. parameters can not be passed by reference because the remote system has no access to the memory of the called systems where the referenced data are located.
    Remote call means only a restriction for the remote call, not for any direct call.
    Regards,
    Clemens

  • Function module DD_DOMA_GET not remote enabled in miniSAP system

    Hi Experts,
    I've succesfully installed miniSAP system (from ABAP Objects book).
    The problem is that when I try to import the Meta Data of any BAPI in the Web Dynpro for Java model, it throws an error that "DD_DOMA_GET is not remote enabled".
    When I try to change the function module DD_DOMA_GET, it does not allow me to do so.
    As a result, I cannot import the metadata for any of the available BAPIs.
    Please advise.
    Regards,
    Nitin

    Hi,
    Create a custom wrapper FM which is Remote enabled & call the FM DD_DOMA_GET inside your custom Remote FM. Changing the std. FM would be a core code mod. hence above approach would be safe.
    Thanks,
    Best regards,
    Prashant

  • Remote enabled function modules IN R/3

    hi,
    i posted this question before but i didnt get a convincing answer to move forward
    when data is sent to bw from r/3 there should be some remote enabled function modules which are  getting fired.
    so people told me to find fm for each data source in 'ROOSOURCE'  table.
    and to debug to get the function module IN RSA3.
    i got those function module but these r 'NORMAL FUNCTION MODULE'  but not
    'REMOTE ENABLED FUNCTION MODULES'
    IF REMOTE ENABLED FM'S ARE NOT GETTING TRIGGERED THEN HOW IS DATA GOING TO BW
    PLEASE SUGGEST ME I AM WAITING FOR LONG TIME FOR A GOOD ANSWER.

    OK,
    this is a big project.... You want to simulate a BW system.... I think don't think it is not possible but R/3 is a pair exchanging a lot of information and a lot of settings have to be done.... this seems to me very complex....
    This will depend on what kind of datasource you want to extract....
    - Master data: I would directly go the you SAP database and extract the info form the tables directly (we are actually doing that)
    - LO datasources would be a bit more complex since you'll have to initialize your datasource from a BW system.... Or figure out how this is working, meaning reverse engineering of the whole stuff! You could even think about using the exits for the business events, e.g. when an article doc is created, write the data in a flat file and/or write it directly to the DB of your DW....
    Also I would setup a BW system anyway; it is so easy then to manage all this data... You could then stick to load the data to the PSA and extract it very easily to your external DW. Even BW provide much more extraction capabilities once the data is stored there....
    They're a lot of solutions like always... the challenge is to choose the best one.
    hope this helps...
    Olivier.

  • Remote-enabled FM - empty value for import parameter

    Hi,
    I've created a remoted-enabled FM in ECC, to be called by an ABAP program in CRM.
    The FM has a import parameter of table (of char type). When it's called by the client with a value, but the debugging shown that the value is empty.
    Is there any special attention needed when defining table type for the import parameter?
    Any help would be much appreciated.
    p/s: Apology for te newbie question.
    Thanks.
    -julius

    Hello,
    When you declare parameters under the TABLES tab, you are actually declaring a global table with header-line in the FM. Be sure you re sending/checking the values in the table, not the header line.

  • Remote enable module - exceptions issue

    Hello all,
    I have a function module.
    I choosed to make it RFC :  Remote enable module.
    Then I got the message During RFC/update, no exception classes can be used, when I try to check it.
    So I commented all parts regarding exceptions, deleted the Exceptions part .
    And I still receive the same message
    I don't know what else to do... Does anybody has an advice ?
    Thank you !!!

    Hello Ariana
    Most likely there is an exception class defined in the signature of your function module.
    Remove the exception class and replace it with a standard exception and then the compilation error should disappear.
    However, RFC-enabled fm's should not raise any exception because otherwise the RFC connection will dump. Instead, return the errors as messages in a RETURN parameter (of table type BAPIRETTAB) like it is done in BAPIs.
    Regards
      Uwe

  • BAPI_GET_PAYSLIP_PDF not remote enabled

    Hey All,
    I would like to use BAPI_GET_PAYSLIP_PDF through a web service, but the BAPI is not remote enabled.  Anyone know why?  I tried copying it to a 'Z' version and set the remote enabled option, but it still does not work when testing the web service.

    Don't copy it. Create a wrapper like this and give it a try and don;t forget to make it REMOTE enabled.
    FUNCTION zbapi_get_payslip_pdf.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(EMPLOYEENUMBER) LIKE  BAPI7004-PERNR
    *"     VALUE(SEQUENCENUMBER) LIKE  BAPI7004_RL-SEQUENCENUMBER
    *"     VALUE(PAYSLIPVARIANT) LIKE  BAPI7004-PAYSLIP_VARIANT
    *"  EXPORTING
    *"     VALUE(RETURN) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
    *"     VALUE(PAYSLIP) TYPE  XSTRING
    *"     VALUE(PDF_FSIZE) TYPE  I
      CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
        EXPORTING
          employeenumber = employeenumber
          sequencenumber = sequencenumber
          payslipvariant = payslipvariant
        IMPORTING
          return         = return
          payslip        = payslip
          pdf_fsize      = pdf_fsize.
    ENDFUNCTION.

Maybe you are looking for

  • Can I set a value to a control in LabVIEW 6i?

    Hallo, i wish to control an output with a checkbox (true/false). In several times it could happens that this output come true. How can i set the checkbox, whos control the output? I try with an OR-gatter but LabView doesn't allowed feedback-loops. Fo

  • CD splits during import

    sometimes when I am importing a CD its contents are split into two different albums with the same name, is there anyway I can merge the two albums into one?

  • Nw 7.4 Java No DBACOCKPIT

    I just installed a brand new NW 7.4 PO installation. Of course its Java only. This is running on Sybase ASE. So I wanted to run DBACOCKPIT, I cannot seem to find it. All the documentation I see leads me to believe its only an ABAP/Webdynpro program.

  • How to create crystal reports using MSDE 2000?

    Post Author: S_Muhilan CA Forum: Deployment Hi, I am using Crystal report 8.5. My Database sqlserver 2000. I generated reports and are working fine. Now I want to use MSDE 2000 instead of Sqlserver 2000 due to license factor. My application is develo

  • Shipment cost document - Service agent differnt from invoice party

    hi all , i have a shipment where the SA is differnt from the invoice party . the SA isnt configured in the system for pricing and the invoice party ( Other SA )  is configured . 1) how can i open the the shipment document with the relvant cost that d