Calling ABAP Subroutines: PERFORM  example

hi friends,
Can any one give me an example on Calling ABAP Subroutines: PERFORM   or provide any links for that example already posted in sdn ...
points will be awarded
regards and thanks
Vijaya

hi
With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).
You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.
Internal Subroutine Calls
To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:
PERFORM <subr> http://USING ... <pi>...
http://CHANGING... <pi>... .
The internal subroutine can access all of the global data of the calling program.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm
reward point if helpful.
thanks

Similar Messages

  • Query regerding Sapscript : Calling abap subroutines

    Hello everybody
    Hope everyone is doing fine.
    I've a small query. Whenever we require to call an abap subroutine from an abap sapscript we do the same using PERFORM statement. The syntax for the same is as below:
    PERFORM SUBROUTINE_NAME IN PROGRAM PROGRAM_NAME
    USING &VARAIABLE&
    CHANGING &VARAIABLE&
    ENDPERFORM
    Here we are passing the varaiables to the subroutine and getting back values in varaibles. In the actual program we then read values from in_tab and out_tab having structures similar to itcsy.
    The above mentioned is as per my understanding. My query is as follows:
    If in the above statement instead of passing varaibles abnd getting back variables can be pass/get back an internal table?
    I had read somewhere that it is possible using structures. If anyone is aware of how to do the same can you please give me the syntax. Actually how to get value from subroutine into an internal table. What will be the structure? Will it be same as itcsy?
    Thanks a lot to everybody in advance.
    Thanks & Regards
    Kabir Radhakrishnani

    hi check this program!!!
    REPORT Z_TEST_VBBE .
    types : begin of t_vbap ,
             VBELN like vbap-VBELN,
             posnr like vbap-posnr,
             concat(18),
            end of t_vbap.
    tables : vbap .
    select-options : s_vbeln for vbap-vbeln .
    data : it_vbap type table of t_vbap ,
           wa_vbap type t_vbap.
    select vbeln posnr from vbap into table it_vbap
    where vbeln in s_vbeln .
    " group by vbeln.
    loop at it_vbap into wa_vbap .
      perform select_data using wa_vbap-vbeln
                                wa_vbap-posnr
                       changing wa_vbap-concat      .
      modify it_vbap from wa_vbap .
    endloop .
    *&      Form  select_data
    *form select_data using vbeln type vbap-vbeln
                          posnr type vbap-posnr
                          concat.
    *endform.                    " select_data
    *&      Form  select_data
    form select_data using    p_wa_vbap_vbeln
                              p_wa_vbap_posnr
                     changing p_wa_vbap_concat.
             concatenate p_wa_vbap_vbeln
                         p_wa_vbap_posnr
                    into p_wa_vbap_concat
                    separated by '|' .
    endform.                    " select_data

  • Problem in calling ABAP Subroutine from SAPSCRIPT

    Hi,
    I need to get the reason for cancellation of a Business Even in Training & Event Management module, so I am passing Emp_id.
    But the reason(CAAATRT) is returned with blank by the code.
    please help.
    /:DEFINE &EMP_ID&= &PPVAR-TOBJD&
    /:PERFORM HR_REASON_PRINT IN PROGRAM ZHR_REASON_PRINT
    /:USING &EMP_ID&
    /:CHANGING &CAATRT&
    REPORT  ZHR_REASON_PRINT.
    DATA : BEGIN OF in_par OCCURS 10.
            INCLUDE STRUCTURE itcsy.
    DATA : END OF in_par.
    DATA : BEGIN OF out_par OCCURS 0.
            INCLUDE STRUCTURE itcsy.
    DATA : END OF out_par.
    DATA:   TOBJD TYPE PPVAR-TOBJD,
            ADATANR TYPE HRP1001-ADATANR,
            CAATR TYPE HRPAD25-CAATR,
            CAATRT TYPE T77CART-CAATRT,
            EMP_ID TYPE C.
    TABLES     : PPVAR,
             HRP1001,
             HRPAD25,
             T77CART.
    FORM HR_REASON_PRINT TABLES input output.
    in_par[] = input[].
    out_par[] = output[].
    READ TABLE in_par INDEX 1.
    CHECK sy-subrc = 0.
    TOBJD = in_par-value.
    MOVE in_par-value TO TOBJD.
    SELECT ADATANR
    into ADATANR
    FROM HRP1001
    WHERE OBJID EQ TOBJD.
    ENDSELECT.
    SELECT CAATR
    into CAATR
    FROM HRPAD25
    WHERE ADATANR EQ ADATANR.
    ENDSELECT.
    SELECT CAATRT
    INTO CAATRT
    FROM T77CART
    WHERE CAATR EQ CAATR.
    ENDSELECT.
    REFRESH out_par.
      out_par-name = 'DREASON'.
      move CAATRT To out_par-value.
      MODIFY out_par INDEX 1.
    APPEND out_par.
      output[] = out_par[].
    Thanks
    Ramakrishna

    Hi ramakrishna,
    1. while calling subroutines from sapscripts,
    there is a special technique,
    which has got its own limitations.
    2.
    FORM abc
    TABLES
    in_tab STRUCTURE itcsy
    out_tab STRUCTURE itcsy.
    ENDFORM.
    3. The perform in se38 program should be of the
    above format only.
    4. We cannot pass internal tables.
    5. Rather we need to pass
    VARIABLE NAME
    VARIABLE VALUE
    (see the structure of itcsy in se11)
    6. In this form, we have to read
    the internal table in_tab
    to capture the variable name and its value.
    7. Similary, to return the values,
    we have to put one record (for each variable)
    in out_tab.
    regards,
    amit m.

  • How to call a subroutine from sap script

    hi friends,
    Can anybody tell me How to call a subroutine from sap script .
    thanks n regards .
    Mahesh

    hi..
    Calling ABAP Subroutines: PERFORM 
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (‘First page’, ‘Next page’, ‘Last page’) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    regards,
    veeresh

  • ABAP Subroutines in SAP Script forms

    Hi Friends,
    Can any give an example on using ABAP Subroutines in SAP Scripts
    how to call ABAP  subroutine IN FORM  and how to define form statement in abap program
    thanks in advance
    Points for sure
    Regards
    Vijaya

    Hi,
    you have to write
    perform formname in program zprogram
    using  &var1&
    using &var2&
    changing &var3&
    endperform
    in se38 create program zprogram of subroutine pool ttype
    and
    write the
    form
    endform there
    egcode for  a subroutne for changing the amount into indian words
    PROGRAM  ZFII_SR_PAYMNT_CHCK.
    declaring the variables which are necessary
    DATA:
      G_AMOUNT       TYPE PC207-BETRG,          " having  amount value
      G_SPELL_AMOUNT(60)  TYPE C, " LIKE     SPELL-WORD,  " amount in words
      G_SPELL_AMOUNT1(60) TYPE C,        " spell structure
      G_WHTAX TYPE BSAK-QBSHB,   "
      G_QBSHB TYPE BSAK-QBSHB, " FOR COLLECTING THE WITH HOLDING TAX
      G_ZUMSK TYPE BSAK-ZUMSK.
    *DECLARING THE INTERNAL TABLES FOR THE OUTPUT TO BE DISPLAYED.
    TYPES : BEGIN OF T_INPUT_TABLE.
            INCLUDE STRUCTURE ITCSY.
    TYPES : END OF T_INPUT_TABLE.
    TYPES : BEGIN OF T_OUTPUT_TABLE.
            INCLUDE STRUCTURE ITCSY.
    TYPES: END OF T_OUTPUT_TABLE.
    DATA: GWA_INPUT_TABLE  TYPE T_INPUT_TABLE.
    DATA: GWA_OUTPUT_TABLE TYPE T_OUTPUT_TABLE.
    DATA: GIT_INPUT_TABLE TYPE STANDARD TABLE OF  T_INPUT_TABLE.
    DATA: GIT_OUTPUT_TABLE TYPE STANDARD  TABLE OF  T_OUTPUT_TABLE.
    TYPES : BEGIN OF T_ITEM,
              BUKRS TYPE BUKRS,
              BELNR TYPE BELNR_D,
              GJAHR TYPE GJAHR,
              WT_WITHCD TYPE WT_WITHCD,
              WT_QBSHB TYPE  WT_WT1,
             END OF T_ITEM,
           IT_T_ITEM TYPE STANDARD TABLE OF T_ITEM.
    DATA :  GIT_ITEM TYPE IT_T_ITEM,
            GWA_ITEM TYPE T_ITEM.
    GET_SPELL_AMOUNT
    FORM GET_SPELL_AMOUNT  TABLES  INPUT STRUCTURE ITCSY
                                   OUTPUT STRUCTURE ITCSY.      "#EC CALLED
    CLEARING OFF THE VARIABLE USED IN PROGRAM.
      CLEAR:  G_AMOUNT,
               G_SPELL_AMOUNT.
    *clearing the internal tables which we have used.
      CLEAR:
       GIT_INPUT_TABLE,
       GIT_OUTPUT_TABLE.
    *REFRESHING THE INTERNAL TABLES.
      REFRESH:
       GIT_INPUT_TABLE,
       GIT_OUTPUT_TABLE.
    *initially assigning the memory vaules to our internal tables.
      GIT_INPUT_TABLE[]  = INPUT[].
      GIT_OUTPUT_TABLE[] = OUTPUT[].
    *reading the table input to get the amount value.
      READ TABLE GIT_INPUT_TABLE INTO GWA_INPUT_TABLE   INDEX 1.
      IF GWA_INPUT_TABLE-VALUE CA 'X'.
        REPLACE ALL OCCURRENCES OF 'X' IN GWA_INPUT_TABLE-VALUE WITH '0'.
      ENDIF.
    *THIS IS IMPORTANT PART AS IT IS CONVERTING THE
    *CHARACTER FIELD INTO CURRENCY FIELD.
      SHIFT GWA_INPUT_TABLE-VALUE LEFT DELETING LEADING SPACE.
      TRANSLATE GWA_INPUT_TABLE-VALUE USING ', '.
      CONDENSE GWA_INPUT_TABLE-VALUE NO-GAPS.
      G_AMOUNT = GWA_INPUT_TABLE-VALUE.
    *calling the function moudle which will
    *covert amount into words (indian format ).
    *i.e in crores, lakhs, thousands
      DATA: L_SPELLAMOUNT(255) TYPE C,
            L_ONLY(255) TYPE C.
      CLEAR: L_SPELLAMOUNT, L_ONLY.
    *here the amount should not be more than
    99,99,99,999.99 . if it is greater than
    *this amount this function module will not work
    *so give the amount which is lessthan or equal to
    *above said amount.
      IF G_AMOUNT LT '1000000000'.
        CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
          EXPORTING
            AMT_IN_NUM         = G_AMOUNT
          IMPORTING
            AMT_IN_WORDS       = L_SPELLAMOUNT
          EXCEPTIONS
            DATA_TYPE_MISMATCH = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      CONDENSE L_SPELLAMOUNT.
      TRANSLATE L_SPELLAMOUNT TO UPPER CASE.
      CONCATENATE L_SPELLAMOUNT 'ONLY' INTO L_ONLY SEPARATED BY SPACE.
    *moivng the field name into table field.
      GWA_OUTPUT_TABLE-NAME = 'G_SPELL_AMOUNT'.
    *assigning the amount in words to the variable.
    *the reason  behind splitting the word into two parts
    *is--- in the scripts the whole string is not getting
    *printed. So we are splitting it into two parts so that
    *it will print the whole string.
      G_SPELL_AMOUNT = L_ONLY+0(60).
      G_SPELL_AMOUNT1 = L_ONLY+60(60).
    G_SPELL_AMOUNT  = L_SPELLAMOUNT.
    *MOVING THE AMOUNT IN WORDS TO FINAL WORK AREA.
      MOVE G_SPELL_AMOUNT TO GWA_OUTPUT_TABLE-VALUE.
    *MODIFYING THE INTERNAL TABLE FORM THE WORK AREA.
      MODIFY  GIT_OUTPUT_TABLE FROM GWA_OUTPUT_TABLE INDEX 1.
    *FOR THE SECOND RECORD I.E FOR THE NEXT 60characters
      GWA_OUTPUT_TABLE-NAME = 'G_SPELL_AMOUNT1'.
      MOVE G_SPELL_AMOUNT1 TO GWA_OUTPUT_TABLE-VALUE.
      MODIFY  GIT_OUTPUT_TABLE FROM GWA_OUTPUT_TABLE INDEX 2.
    *assigning the total output table to the memory .
      OUTPUT[] =  GIT_OUTPUT_TABLE[].
    ENDFORM.                    "GET_COMPADDR
    thanks & regards,
    Venkatesh

  • Calling subroutine perform background work process

    Hi all,
    Can we call a perform (subroutine)in background work process in a program.
    if yes, pls specify.
    regards,
    Anuj

    Anuj,
    we can call the subroutine..whether it is foreground or background..if the perform statement is used the respective routine is called . Can you be specific on the requirement you are looking after..
    Sagar.

  • Call ABAP Web Service with Java code only

    Hi all,
    First of all, I am writing script in Adobe form but am not using the one in SAP.
    I am trying to call the web service and process the result with script open (i.e. no dataconnection created), because I am trying to do that in a dialog.
    I can call a non-SAP web service without problem, but I am not able to call a simple web service with only a single string input, anyone have any example?
    Here is the SOAP for input:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:Z_RFC_GET_STAFF_BANK_INFO>
             <A_STAFF_ID>0123456</A_STAFF_ID>
          </urn:Z_RFC_GET_STAFF_BANK_INFO>
       </soapenv:Body>
    </soapenv:Envelope>
    Here is my code to call:
         var cURL = "http://some-host-name:port/sap/bc/srt/wsdl/bndg_DEDB492BB032E7F1B09F001CC4FBCEC9/wsdl11/allinone/ws_policy/document?sap-client=300";
         var response = SOAP.request(
              cURL: cURL,
              oRequest: {
                   "urn:sap-com:document:sap:rfc:functions:Z_RFC_GET_STAFF_BANK_INFO": {
                        A_STAFF_ID: "0123456"
    Regards
    Bill

    Hello I have the same problem, were you able to execute the WS through the JS code now?
    I would like to call an ABAP WS using JavaScript to return complex structures that I would like to manage directly with JS.
    I tried with this code and I get the error "RaiseError: Acrobat Raise." when the request is executed:
    var WSUrl = "http://<server>:<port>/sap/bc/srt/wsdl/bndg_4D15C75529330AF1E10000000A150429/wsdl11/allinone/ws_policy/document?sap-client=500";
    var VendorNumber = xfa.form.DATA.DATAFLOW.SF_HEADER.VENDOR_NUMBER.rawValue;
    try {
    // Create request structure, read Input out of text field
    var request = {
              "urn:sap-com:document:sap:soap:functions:mc-style:ZWsTest" : {ILifnr: VendorNumber}
    SOAP.wireDump = true;
    // Call web service using SOAP object
    var response = SOAP.request ({
            cURL: WSUrl,
            oRequest: request
    //        cAction: "urn:sap-com:document:sap:soap:functions:mc-style"
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    with this other code I get the error "SOAPError: CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 'ILifnr'":
    try {
        var myProxy = SOAP.connect(WSUrl);
        var result = myProxy.ZWsTest( { ILifnr: VendorNumber } );
        xfa.form.DATA.DATAFLOW.SF_HEADER.E_DESCRIPTION.rawValue = result;
    // Display the response in the console:
       console.println("Result is " + result);
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    in the second option, if I make the field ILifnr optional the call is succesfully performed but the parameter is not passed to the WS. So the call is working.
    Using stand-alone LiveCycle designer 8.1 and Adobe Reader 8
    Any suggestions?
    Many thanks,
    G.
    Edited by: Guillem Mateu Navalón on Jan 13, 2011 1:13 PM

  • How to call a subroutine in a script ?

    Hi ,
      How to call a subroutine in a script ?
    bye,
    Satya.

    Hello,
    Syntax goes like this
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    Example:
    In script form
    /:   PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    /:   USING &EKKO-EKORG&
    /:   USING &EKPO-WERKS&
    /:   USING &EKKO-EKGRP&
    /:   USING &EKKO-BSTYP&
    /:   CHANGING &COMPNAME&
    /:   CHANGING &SENDADR&
    /:   CHANGING &INVCADR&
    /:   CHANGING &COMPADR&
    /:   CHANGING &COVERLTR&
    /:   CHANGING &SHIPADR&
    /:   CHANGING &REMINDER&
    /:   CHANGING &REJECTION&
    /:   CHANGING &POSTADR&
    /:   CHANGING &LOGO&
    /:   ENDPERFORM
    In program
    FORM Read_texts - To extract the standard texts from the table      *
    FORM READ_TEXTS TABLES IN_PAR   STRUCTURE ITCSY
                           OUT_PAR  STRUCTURE ITCSY.
      DATA : L_EKORG TYPE EKORG,
             L_WERKS TYPE WERKS_D,
             L_BSTYP TYPE BSTYP,
             L_EKGRP TYPE BKGRP.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
      CHECK SY-SUBRC = 0.
      L_EKORG = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
      CHECK SY-SUBRC = 0.
      L_WERKS = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
      CHECK SY-SUBRC = 0.
      L_EKGRP = IN_PAR-VALUE.
      READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
      CHECK SY-SUBRC = 0.
      L_BSTYP = IN_PAR-VALUE.
      CLEAR Z08M1_ORG_TEXTS.
      SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                              AND WERKS = L_WERKS
                                              AND EKGRP = L_EKGRP
                                              AND BSTYP = L_BSTYP.
      IF SY-SUBRC NE 0.
        SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
                                               AND WERKS = L_WERKS
                                               AND EKGRP = L_EKGRP
                                               AND BSTYP = SPACE.
      ENDIF.
      READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SENDADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'INVCADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COMPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REMINDER'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'REJECTION'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'POSTADR'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
      MODIFY OUT_PAR INDEX SY-TABIX.
      READ TABLE OUT_PAR WITH KEY 'LOGO'.
      OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
      MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Hope this helps.
    Regards

  • Calling ABAP from SAPScript

    Hi ,
    I am facing some problem in calling a subroutine from Standard Text element (Txn SO10).
    I have done the following in a text element.
    /: DEFINE &GD_PREV_NAME& = ''
    /: PERFORM GET_PREV_NAME IN PROGRAM ZTEST
    /: USING &P0001-PERNR&
    /: USING &P0002-BEGDA&
    /: CHANGING &GD_PREV_NAME&
    /: ENDPERFORM
    In the ABAP ZTEST,
    FORM get_prev_name TABLES tabin  STRUCTURE itcsy
                              tabout STRUCTURE itcsy.
      DATA : ld_pernr LIKE pa0001-pernr.
      READ TABLE tabin WITH KEY name = 'P0001-PERNR'.
      IF sy-subrc = 0.
        ld_pernr = tabin-value.
      ENDIF.
    ENDFORM.
    I found in debugging that the both tables TABIN & TABOUT are empty in the FORM get_prev_name !!!!
    Can anyone hint on why the values are not passed to ABAP ??
    Many thanks in advance.
    Regards,
    Sandip.
    Ph : +44 121 683 2814.

    Hi Sandip,
    I guess the problem here might be that the values aren't getting flown.
    First try this (hardcoding and testing),
    /: DEFINE &GD_PREV_NAME& = ''
    /: PERFORM GET_PREV_NAME IN PROGRAM ZTEST
    /: USING '1000'
    /: USING '20050101'
    /: CHANGING &GD_PREV_NAME&
    /: ENDPERFORM
    if it works fine, then figure out whether the variables P0001-PERNR AND P0002-BEGDA are not null when passed. If not then try this
    /: DEFINE &GD_PREV_NAME& = ''
    /: PERFORM GET_PREV_NAME IN PROGRAM ZTEST
    /: USING &P0000-PERNR&
    /: USING &P0002-BEGDA&
    /: CHANGING &GD_PREV_NAME&
    /: ENDPERFORM
    ELSE TRY PA0000-PERNR AND PA0002-BEGDA
    Cheers,
    Sam.

  • Calling ABAP Extracts into XI

    Calling ABAP Extracts into XI
    What is my understanding for the above scenario will be follows
    1. Build the ABAP extract (basically SQL from what I understand).  This SQL dictates the structure for master table.
    2. Build a BAPI wrapper around the extract program.
    3. Import the model into XI like any BAPI structure.   (this is a standard RFC integration development step)
    At that point XI could receive the structure and read the data as pure XML.
    Please let me know if this is the best approach for this
    Thanks in Advance

    After craeting ABAP Extract Function module, i guess all i need to check REMOTE ENABLED MODULE under ATTRIBUTE section. So that it can be imported into XI in general
    Btw my scenario would be
    The function modules in Target are enabled for remote access (for example, by Source). The program logic and input parameters of the function modules reside in Target
    I guess the best approach i come across the above scenario until morning.
    Now its better to go with ABAP Proxy
    Which inturns makes you not to write a BAPI to create structure. Which is additional work. Proxy is not on IE. It directly talk to R/3 Which is good in performance wise.
    suggestions are welcome

  • Open Innovation Call: abap interpreter written in java

    Like part of the Open Innovation Call initiative: /people/ignacio.hernndez/blog/2006/12/22/open-innovation-call ,
    I begin this forum thread to open the discussion about "JAbap project":
    I know JRuby...is there something like a abap interpreter written in java? ..java and abap using the same virtual machine....?

    Hello I have the same problem, were you able to execute the WS through the JS code now?
    I would like to call an ABAP WS using JavaScript to return complex structures that I would like to manage directly with JS.
    I tried with this code and I get the error "RaiseError: Acrobat Raise." when the request is executed:
    var WSUrl = "http://<server>:<port>/sap/bc/srt/wsdl/bndg_4D15C75529330AF1E10000000A150429/wsdl11/allinone/ws_policy/document?sap-client=500";
    var VendorNumber = xfa.form.DATA.DATAFLOW.SF_HEADER.VENDOR_NUMBER.rawValue;
    try {
    // Create request structure, read Input out of text field
    var request = {
              "urn:sap-com:document:sap:soap:functions:mc-style:ZWsTest" : {ILifnr: VendorNumber}
    SOAP.wireDump = true;
    // Call web service using SOAP object
    var response = SOAP.request ({
            cURL: WSUrl,
            oRequest: request
    //        cAction: "urn:sap-com:document:sap:soap:functions:mc-style"
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    with this other code I get the error "SOAPError: CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 'ILifnr'":
    try {
        var myProxy = SOAP.connect(WSUrl);
        var result = myProxy.ZWsTest( { ILifnr: VendorNumber } );
        xfa.form.DATA.DATAFLOW.SF_HEADER.E_DESCRIPTION.rawValue = result;
    // Display the response in the console:
       console.println("Result is " + result);
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    in the second option, if I make the field ILifnr optional the call is succesfully performed but the parameter is not passed to the WS. So the call is working.
    Using stand-alone LiveCycle designer 8.1 and Adobe Reader 8
    Any suggestions?
    Many thanks,
    G.
    Edited by: Guillem Mateu Navalón on Jan 13, 2011 1:13 PM

  • Call ABAP function by xsjs

    Hi experts,
    How can i call ABAP function or function module using SAP HANA xsjs.
    Thanks,
    Shambhu Nath

    Thanks Sreehari,
    Actully i want to call predefine ABAP function using XSJS.
    Example: CONVERSION_EXIT_MDLPD_OUTPUT etc.
    Thanks,
    Shambhu Nath

  • Calling a subroutine from BSP application

    Hi
    i want to know how to call a subroutine/form in another package in same R/3 system in my BSP application.
    Is there any way to implement this. ?
    What if the subroutine has furhter LOCAL forms called inside it. will they be used as well while calling from my BSP application.
    PLease help.

    you can do that.
    perform p1 IN PROGRAM ('Y_P_TEST') IF FOUND  .
    do you have problem in doing this? what issues are you facing.
    Regards
    Raja

  • Calling abap method in xslt mapping?

    Hi
    I need to call abap method in my xslt mapping , i tried with
    <sap:external-call >and <sap:external-function> .
    But it is giving short dump error.
    Can anybody give me proper syntax..
    thanks
    Prasad

    Hello,
    Please see the code below.
    This is how u call
      <sap:external-function class="ZTEST_CLASS" kind="class" method="GETRECORDCOUNT" name="ns0:GetRecordCount">
        <sap:argument param="XXXX" type="string"/>
        <sap:argument param="YYYY" type="string"/>
        <sap:result param="ZZZZ" type="string"/>
      </sap:external-function>
      <xsl:template match="/">
        <xsl:param name="Counter">
    *And this is how u call below...
    <xsl:value-of select="ns0:GetRecordCount(A,B)"/>
    </xsl:template>
    </xsl:transform>
    Regards,

  • Urgent: Calling ABAP Program using JMS

    Hi,
    I have a scenario where legacy system pass some messages to ABAP Program and this program can handle one message at a time (written in that way).
    Now the receiver communication channel is configured to access J2SE adapter. This J2SE adapter stores the message on R/3 system and triggers the ABAP program located in R/3 system.
    Now when multiple messages are coming at a time in SAP-XI and processed successfully and handover to J2SE adapter. But J2SE adapter triggers the ABAP program for all messages. And here is the problem. ABAP program is not supporting multi - threading.
    my idea is to use JMS adapter...can you guys suggest me how to achieve result and how to configure JMS or any other adapter to call ABAP Program so that only one message will pass to ABAP program at a time.
    Regards,
    Gourav Khare

    Hi,
    First find out where your ABAP program the data written.You need to write it into and spool then only you can see it.
    Transaction SP01, you can use the FM 'GET_PRINT_PARAMETERS' in your abap program to write to spool.
    Thanks,
    Ravi

Maybe you are looking for

  • Anyone know the cause for this kernal panic?

    I was think it might have something to do with the Steelseries USB headset cause i unplugged it and pluged it back in and then my Imac froze and restarted. Anonymous UUID:       F7E5E7A2-97C2-DCCF-A17B-32F49B4397DE Thu Feb 20 15:40:52 2014 panic(cpu

  • Assertion_Failed dump when accessing Design Time for Processes & Forms EP3

    After exhausting SAP note searches and the SDN community forums, blogs & wiki searches, I decide to make my first SDN post: After installing Enhancement Pack 3 to the base ECC 6.0, we got the Design Time for Processes & Forms node in the IMG under HR

  • Object Performace Problems

    In order to model a situation I need an object type to hold a table of objects of the enclosing type. In order to accomplish this I did the following (using 11.2.0.1 running on Windows 64-bit): <li>declared a base type without the table of objects <l

  • Network driver attach routine not called

    I'm writing a STREAMS device driver for a PCI network card. When I add the driver using add_drv (as described in the ae sample from sun), my driver's info, init, and then _fini routines are called. Can someone offer any suggestions on how to figure o

  • I don't see a tab to access my photos on iCloud website

    I'm trying to access my photos on iclouds website and there isn't a tab for photos, I've looked at everything i can think of and searched online, all my settings are on, are my photos gone?