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

Similar Messages

  • 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

  • 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 ABAP report from BEx query

    Good day!
    I want to call ABAP report from BEx query by right-clicking on the field and using context menu. I know that transaction RSBBS is used (sender-receiver connecting), but I don't know how to transfare data to ABAP program
    In ABAP program I want to know at least data from those cell in BEx query, that was right-clicked.

    Depending on your requirement and environment, you have the following options:
    1. Use an info spoke and make selections as you would in a query.
    2. USe FM RS_VC_GET_QUERY_VIEW_DATA_FLAT to send the data to a file and your ABAP can read this file.
    Ravi Thothadri

  • 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.

  • Sapscript calling forms from program

    Hi experts
    I need to write a form in a program to get values.
    Here is my code. But i cant seem to succesfully compile it. Need help. I want to take
    ernam from sapscript and send name and lastname back. Can u please fill the function.
    Also i have an error says  itcyy is not a structure ?
    thanks.
    REPORT  ZME23N_SAPSCR_FM.
    tables : user_Addr.
    form get_Values TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    *READ TABLE IN_PAR WITH KEY 'ERNAM'.
    *data firstname like user_addr-name_first.
    *select single * from user_Addr
    *where bname = ernam.
    *firstname = user_Addr-name_first.
    *lastname = user_addr-name_last.
    endform.

    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.

  • Call ABAP Program in Process Chain

    Dear BW Gurus,
    I need to call an Process chain which includes ABAP Program.
    The ABAP Program doesn't have the variants but it accepts the inputs from the user and sets into a YXXXX table.
    I am not getting how to proceed in this regard.
    Kindly guide.
    Best Regards,
    Harsh

    hi,
    chk these links below.. they contain the resolution for your query
    Call ABAP Program in Process Chain
    ABAP in Process Chains
    Also chk this relase which ia an entire guiding one to ABAP Program in Process Chain
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7

  • 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

  • Call Abap Function.

    HI.
    How to call Abap FM from Bex Web Application?

    Or you create your own SICF service in Transaktion SICF e.g. http:s//server:port/zcompany/sample
    in that case you can add a simple link and add parameters like sample?ID=xyz&subid=TEST
    in ABAP you need to create a Abap Class that implements Interface IF_HTTP_EXTENSION
    in the Methode HANDLE_REQUEST you can retrieve the Parameters from the Query String and execute your function.
    In SICF you can add this class in the Handlerlist of the newly created service.
    Hoipe this helps.
    best regards,
    Kai

  • Why the sapscript called as client dependent? y smartform not?

    why the sapscript called as client dependent? y smartform not?

    Few more reasons why....? Please read below:
    SAPscript technology is based on a mainframe product from the 1980s,
    while Smart Forms have only been around since (roughly) 2001. With that sort of time gap,
    there are bound to be significant differences between the two tools. As you have noted correctly, client dependence is a fundamental one.
    Although SAPscript has had some incremental improvements over time,
    its forms have always been -- under the hood -- relatively passive objects, with minimal embedded logic.
    These forms were designed to be driven and controlled by ABAP programs,
    much in the way ABAP programs read in database tables to produce reports;
    if you ever download a SAPscript form (e.g., via utility program RSTXSCRP),
    and look at the portable text file it produces you'll see what I mean.
    Many text objects (e.g., invoice header texts) are bound directly to documents which are client-dependent, so it makes sense for these text objects to also be client-dependent. From a complexity standpoint, SAPscript forms are close enough to these text objects where I can see how it made sense at the time to make them client-dependent too.
    Conversely, a Smart Form is significantly more robust and complex. For instance, it can contain program nodes and nested tables with patterns. When a Smart Form is compiled, it generates an ABAP function module – and these are always client-independent. This is appropriate, given that this form has more in common with an ABAP program than its predecessor. For instance, when a print program calls a Smart Form, the form itself takes over to produce output, without any further direction from the print program. In fact, the join is so seamless that I often find myself using a Smart Form's Initialization section for logic to handle any data gathering not handled by the print program. I would never even think to attempt this with SAPscript.
    Several factors figured into SAP's decision to make Smart Forms client-independent, including customer feedback. There are significant advantages to client-independence. For instance, a change made in one development client happens immediately across all development clients. Among other things, this means we don't have to waste time figuring which client contains the most recent version -- they all do! In addition, transporting Smart Forms is easier, since we can safely bundle them together in the same transport as their client-independent print programs (no worry about mixing client-dependent and independent objects).
    Thanks,
    Santosh

  • 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

  • Calling ABAP method from JCo

    Hi All,
    I need to invoke a static method of an ABAP class from JCo. Is this possible? I am new to JCo. Any help in this regard is highly appreciated.
    Thanks,
    Praneeth

    Hello Praneeth,
    i'm not sure about calling ABAP class method from JCo directly, but there is a possibility to call function module from SAP R3. And the shortest way to do so is described in Re: Accessing SAP backend from j2ee without entrprise portal thread, answered by me.
    I guess there is no problem to call an class method from an function module.
    Please consider rewording points if helpfull.
    regards,
    mz

Maybe you are looking for

  • 2 Apps will not sync due to error??

    I just purchased a few apps and two of them will not sync to my touch. I am getting a pop up box that says error OXE800002D and OXE8000013. I haven't had this response before. Does anyone know how to get this to work? Thanks!

  • Stuck in a sync request from Backup Assistant

    I just got an replacement Barrage and am working with Backup Assistant but it's stuck in a sync request that didn't work.  Here's what has happened: I backed up contacts to Backup Assistant from old phone. worked fine.  Looked at contacts on-line and

  • Issues,Documents and Risks in primavera

    Can any one explain about Issues,Documents and Risks in Primavera. what is the Exact use of those. In which Scenario we have to use those.

  • To delete trash messages with expire.rule

    Hi, With Messagin server 6.0 I have put this rule in: /opt/SUNWmsgsr/config/store.expirerule Rule2.regexp: 1 Rule2.folderpattern: user/.*/trash Rule2.messagedays: 1 So It must delete all messages in users trash folder older than 1 day. Is this correc

  • HT4436 How can I turn off another users iCloud from my profile on a mac

    My partner and I share our Mac, he uses icloud and I dont. So since he has installed it my profile reflects his icloud preferences, it brings his contacts and uses hies details for autofill. Please can somone tell me how to sort out?