Passing values to function module

Hello Everybody!
     I have defined a function group ZSUB_FGROUP1 and within that, I have defined a function module ZSUB_FMOD1. I wish to pass one set of values of following types:
VBELN, POSNR, MATNR, ARKTX, KWMENG, VRKME, NETWR   from VBAP
and  WAERK from VBAK.
from my main report ZSUB_REP1 to ZSUB_FMOD1, which will then print those values in the form of a list. When I processed the list from within the main report, I used regular methods like top-of-page and all. But, I am not sure how to handle things from within the function module. Please help!

Hi...
When u create the function module , we generally provide the import and export parameters....
<b>Import parameters :</b> Which we pass to the function module ..
<b>Export parameters:</b> Which we receive from the function module...
<b>Tables parameters:</b> Tables to pass and to receive to and from the function module...
<b>Changing Parameters:</b> Which we pass to the function module and change these values in the function module and receive those from function module...
So define the fields
VBELN, POSNR, MATNR, ARKTX, KWMENG, VRKME, NETWR ,WAERK in the import parameters with LIKE declaration and corresponding type..
<b><u>Field  ||  Type  || Associated Type || Optional || Default ||</u></b>
vbeln  || like  ||  vbak-vbeln ||
<b>Optional : </b>If u check this then this field is not mandatory to receive the value..
If uncheck then we have to pass value to this field from the program !! otherwise it gives an error.
In the <b><u>source code</u></b> tab u can write the list output related code with these imported and exported parameters !!
To call the function module we use<b> PATTERN </b>which is present on the application tool bar of the SE38-Editor screen..
Click on this .. u will get a popup ..IN this check the <b>CALL FUNCTION</b> and in the input field of this,, give the function module name... and press enter ...Here u can give values for these imported fields...
reward if it helps u...
sai ramesh

Similar Messages

  • How to pass values to a module pool program from another Report Program

    Hi ..
    Please let me know how I can pass values to a MODULE POOL selection screen field from another Report Program.
    Thanks
    RK

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/frameset.htm

  • Passing SELECT-OPTIONS value to Function Module

    Hi,
    I need to pass select-options value to a function module.
    Code is like the following:
    SELECT-OPTIONS seltab FOR object-type.
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
    However, that could not help me much in solving my problem.
    So far I have tried to created a structure in DDIC with the following components for the select-options:
    SIGN - BAPISIGN
    OPTION - BAPIOPTION
    LOW - ZBWOBJECTTYPE (my type)
    HIGH - ZBWOBJECTTYPE (my type)
    and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
    Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
    Could anyone please help me on this issue?
    Thanks in advance.
    Regards,
    Joon Meng

    Hello Joon,
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    You have defined SELTAB as a SELECT-OPTION.
    So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
    It is similar to the concept of an internal table with header line.
    Hope i am clear.
    Anyways how have you defined result_tab and sel_tab ?
    BR,
    Suhas

  • How to pass parameters into Function module : CLOI_PUT_SIGN_IN_FRONT

    Hello friends,
    I am displaying values ie, amounts in the screen using write statements here i have to display the
    sign left side , i am using  Function module   'CLOI_PUT_SIGN_IN_FRONT'    
    Does anybody help me - How to pass paramter into this Function module.
    Regards,
    Phaneendra

    If you look to the code of the function module, you can see it is condensing the value.
    I would make a copy of this function, and remove the condense lines to give the result you want.
      data: text1(1) type c.
      search value for '-'.
      if sy-subrc = 0 and sy-fdpos <> 0.
        split value at '-' into value text1.
        condense value.
        concatenate '-' value into value.
      else.
        condense value.
      endif.

  • What are minimum passing parameters for function module CS_BOM_EXPL_MAT_V2

    Hi
    Im going to use FM: CS_BOM_EXPL_MAT_V2 and I want to only pass WERKS, but when I execute FM is gives exception as CALL_INVALID.
    I saw all the Import parameters are Optional, but I think I need to pass more inputs to FM.
    Please let me know what are MINIMUM input parameters required to run this FM
    Thanks

    Hi
    In my requirement, there are range of WERKS and MATNR which has to be given from selection screen, where as In CS_BOM_EXPL_MAT_V2 function module I can only give single value for WERKS and MATNR.
    Can any one guide me how can I implement this?

  • How to pass parameters to function module

    Hello,
    Can someone suggest how to pass parameter values to BAPI function module from a .NET client? I am using the BAPI_PO_GETDETAILS module and want to pass required parameters to get the item details. Also, please let me know which table should I refer to when retrieving the result. I am using sap .net connector 3.0.
    Thanks in advance

    Hi unosino,
    at http://www.se80.co.uk/sapfms/b/bapi/bapi_po_getdetail.htm you can see, that you have to pass po_header and po_address to the function.
    You can do that with the nco3 like this:
    IRfcFunction rfcFunction = destination.Repository.CreateFunction("BAPI_PO_GETDETAILS");
    rfcFunction.SetValue("po_header", /* your value */);
    rfcFunction.SetValue("po_address", /* your value */);
    rfcFunction.Invoke(destination);
    kind regards
    christian
    Edited by: chrislind on Nov 11, 2011 2:47 PM

  • Probelem with passing parameters to function module

    hey i am facing a problem to pass the parameters to function module.let me explain.. we cant pass the parameters which we are using in the select option statements directly to a function module called...i just wanna know if there is any way so that i can pass those values to a fnc module while passing it from select options

    Hi,
    You have to create a table type in SE11..
    Check this sample table type PDSMAINT_MATNR_RNG_T...
    Then use that table type in the importing parameter of FM..
    PT_MATNR TYPE PDSMAINT_MATNR_RNG_T..
    For which field you have created select-options..I will check if there is any existing table type in se11..
    Thanks,
    Naren

  • Reg : Setting a attribute value through function module

    Hi guys,
           I got a RFC to To read the attribute of a particular work item ( SWI_READ_CONTAINER_ATTRIBUTE ) simillarly Is there any function module to write the attribute?
    Thanks,
    Mugundhan

    Hi Mugundhan ,
    if you want to pass Value to workflow container variable while starting the workflow
    use function module SAP_WAPI_START_WORKFLOW and pass value to the Table parameter input_container 
               wa_container-element = 'TEMP_AGENT' .
                 wa_container-value   = 'SAPUSER' .
             APPEND wa_container TO lt_container .
    if you want to update the workflow container .
    using the function module SWW_WI_FIND_FATHER_WIS  to get father workitem here only all the container variable available .
    then pass father workitem to the function module SWW_WI_CONTAINER_READ,  this function module will return the container values in table parameter wi_container   
    using  the function module you can update the workflow container variable
      CALL FUNCTION 'SWC_ELEMENT_SET'
                        EXPORTING
                          element       = 'TMP_AGENT'
                          field         =  'SAPUSER;
                        TABLES
                          container     = lt_container
                        EXCEPTIONS
                          type_conflict = 1
                          OTHERS        = 2.
    thanks and Regards
    Krishnan R

  • Passing parameter in function module

    hi friends,
    I have created one function module in which i need to pass PO/SO number from standard EKKO/VBAK tables through the select option parameter S_POSONO. Inside the function module I have a select query which fetches the records from a Z-table which has a field called 'REFERENCE' which is 16-char long. Hence the length mismatches with PO/SO no which is 10-char long. the first 10-char from 'REFERENCE' is PO/SO number, next 3-char is line-item num, and the last three char is schedule item num. It is required to match only first 10-char with the parameter passed i.e, S_POSONO and display only those datas.
    The function module is as follows.....
    Function :
    CALL FUNCTION 'YFIIN_RETRIEVE_SOURCE_DATA'
    EXPORTING
       LT_RANGE_BUKRS          = S_BUKRS[]
       LT_RANGE_DOCNO          = S_POSONO[]
       LT_RANGE_DOCDATE        = S_DATUM[]
       LT_RANGE_CURRENCY       = S_FCURR[]
      TABLES
        IT_TEMEXPOSU            = LT_TEMEXPOSU
    EXCEPTIONS
       INVALID_SELECTION       = 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.
    Source code inside function module:
      SELECT * FROM ZFIGL_TEMEXPOSU INTO  TABLE IT_TEMEXPOSU
                                     WHERE   COMPANY_CODE IN LT_RANGE_BUKRS
                                     AND  currency in LT_RANGE_CURRENCY
                                     and  REFERENCE in LT_RANGE_DOCNO
                                     and  doc_date in LT_RANGE_docdate.
    IF SY-SUBRC = 0.
    SELECT COMPANY_CODE ATTRIBUTE_01 REFERENCE CREATION_DATE FOREIGN_CURR                                                               
               FROM TEMT_RAWEXPOS APPENDING CORRESPONDING FIELDS OF
                   TABLE IT_TEMEXPOSU WHERE COMPANY_CODE IN  LT_RANGE_BUKRS
                                     AND REFERENCE in LT_RANGE_DOCNO
                                     AND CREATION_DATE IN  LT_RANGE_DOCDATE
                                     AND FOREIGN_CURR IN LT_RANGE_CURRENCY.
       ENDIF.
    Import Parameter of Function Modules :
    LT_RANGE_BUKRS   - type - BUKRS
    LT_RANGE_DOCNO  - type - EBELN
    LT_RANGE_DOCDATE - type - DOKDATS
    LT_RANGE_CURRENCY - type - WAERS
    please help me to solve this problem..

    Hi Ram Tej,
    Try this.
    First Read all the records without Checking REFERENCE field with LT_RANGE_DOCNO into an internal Tbale.
    Then looping at that internal table delete records from the same internal table where REFERENCE(10) <> LT_RANGE_DOCNO.
    Hope this may help ur requirement.
    Award points if useful.

  • How to get data from table to pass into alvgrid function module

    i want to get some data from below table to pass into function module of alvgrid
    how can i get data please help.
    thanks in advanced.
    form get_data.
    select * into corresponding fields of table itab
             from  J_1IEXCHDR
                     inner join  J_1IEXCDTL
                        on  J_1IEXCDTLlifnr =  J_1IEXCHDRlifnr
                     where  J_1IEXCHDr~status = 'P'.
       append itab.
    endform.

    Pass your final table(internal table which you want to display) along with fieldcatalog to FM reuse_alv_grid_display.:\
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = i_repid
       IT_SORT               = gt_sort
          it_fieldcat        = lt_fieldcat[]
        TABLES
          t_outtab           = lt_final
        EXCEPTIONS
          program_error      = 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.

  • Financial Statement Version - Value Help Function Module

    Hi,
    I want a function module or a bapi which retrieves all the Financial Statement Versions defined in the system, just like bapi_companycode_getlist which list down all the company code.
    Thanks,
    James.

    Hi Drogo ( sorry u didn't make it to more sessions )
    that Ledger above which Dinesh Kumar Rengarajan menitone is only relevant when New GL is activated. I think you didn't have New GL active or?
    Please use simply in F.01 "Special evaluatioins" and field Alternative period selection ( for referenc use simply F1 ... it will show this example
    Examples
    Company code 0001 with fiscal year end 12
    Company code 0002 with fiscal year end 09Calendar reporting period............. 01/01/1990 - 12/31/1990
    The periods 1990/01 to 1990/16 are used as reporting periods for company code 0001 and the periods 1990/04 to 1990/16 and 1991/01 to 1991/03 are used as reporting periods for company code 0002. The same is valid for the comparison period.
    I think this is what you want or?
    Regards
    Jan

  • Problem in Passing internal table Function module

    Hi experts,
    I am new to creating function module and needed certain suggestions.
    I have created a type inside the FM
    types: begin of T1
    field A
    field  B
    end of T1.
    Now, i have populated the internal table of this type but how to send it through the tables tab of my FM.
    IN the parameter, i can write my internal table name but what should be associated type ...
    Please give some suggestions

    Hi,
      Not required.
    Table parameter will behave like type table of Z_sturcture. So just define the structure and use it in the TABLE parameter.It will convert that into internal table..
    Example :
    Parameter name         Typing                Associated type
    T_RETURN                  LIKE                   your Z_structure
    If you want to give table in the import parameter, then you need to create the table type for the structure.....

  • How to capture the values that are being passed to a function module?

    Hello Experts!
    While executing the transaction SBWP  to send a document the FM 'SO_DYNP_SHORT_MESSAGE' gets triggered as soon as the SEND button is pressed would anybody please let me know how i can capture the values that are being passed to it in the process of sending a document?
    Regards
    Sanguine

    Hi
    well, I'm not asking you to explain about how an implicit enhancement can be done. i was just referring to the two options posted in the reply. Is there any other way out apart from the implicit enhancement option. i do find class CL_BS useful as the Method ADD_RECIPIENT gets triggered . even though there's no attachment option in the screen that pops up after the method ADD_RECIPIENT is triggered. would anybody suggest me as how to proceed further to capture the values though without attachment details
    Regards
    sanguine

  • How to pass select option value to function module while using service call

    Hi,
    I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
    rgds
    sudhanshu

    Hi,
    Thank s for your reply. In fact im doing similar with following variation:
    i) collected range values using get_range* method.
    ii) separate low and high values as: 
    read table <field2> index 1 into wa_range.
    vert2_low = wa_range-low.
    vert2_high = wa_range-high.
    (Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
    iii) Now setting these RFC attribute as:
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_LO`
          value = vert2_low ).
    and
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_HI`
          value = vert2_high ).
    iv) In RFC im having my query as :
    select <fld list> from BUT000 into table itab where vertical in r_vert.
    Here, r_vert is a range defined as:
    ranges r_vert for <fld refrence>
    r_vert-sign = 'I'.
    r_vert-option = 'BT'.
    r_vert-low = S_VERT_LO.
    r_vert-high = S_VERT_HI.
    append r_vert.
    Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
    Please suggest.
    Rgds
    Sudhanshu

  • Passing value to class module

    hi i am usign class
    CALL METHOD cl_ppeliwty_cntl=>claim_read_db
       EXPORTING
         iv_lock_flg         = ppet_true
         iv_msg_opt          = ppet_msg_options-do_error
         iv_with_partner     = ppet_true
         iv_with_customizing = ppet_true
         iv_with_node_text   = ppet_true
             iv_clmno            = it_qmel-wtyno
           IMPORTING
         et_pnodtx           = lt_pnodtx
            et_pnwtyh           = lt_pnwtyh_dia
          et_paltid           = lt_paltid
          et_pnwtyv           = lt_pnwtyv_old
          et_posvid           = lt_posvid
          et_pvwty            = lt_pvwty_dia_old
          et_pnodid           = lt_pnodid
          et_prelid           = lt_prelid
          et_cwty001          = lt_cwty001
          et_wtyv_imrg_dyn    = lt_wtyv_imrg_dyn
           EXCEPTIONS
             authority_failed    = 2
             OTHERS              = 1.
    in my program to read claim..
    i am passing claim no(wtyno) and try to get claim header details..  but due to some reasons i am not able to pass wtyno.. my whole scenario is to get input tracking no from user (qmeltable) and find all the claim no relevant to tracking no.. later usign that claim no i have to call a class module to read claim.. and show some of the claim fields as output
    below given my whole code
    REPORT  Z_PS_CREDIT_MEMO                        .
    tables: pnwtyh, QMEL.
    TYPE-POOLS: ppet,rsds,pwty.
    TYPES: BEGIN OF ls_select,
              point(12) TYPE c,
             END OF ls_select.
    DATA:  ls_pnwtyh         TYPE pnwtyh,
            lt_pnwtyh         TYPE pwty_pnwtyh_li_tab,
            es_pnwtyh         TYPE pwty_pnwtyh_li_tab,
            lt_pnwtyh_from    TYPE pwty_pnwtyh_li_tab,
            ls_pnwtyv         TYPE pnwtyv,
            ls_pnwtyv_old     TYPE pnwtyv,
            ls_pnodid         TYPE pnodid,
            ls_paltid         TYPE paltid,
            ls_pvwty          TYPE pvwty,
            lt_pvwty          TYPE pwty_pvwty_li_tab,
            lt_pvwty_new      TYPE pwty_pvwty_li_tab,
            ls_pnodtx         TYPE pnodtx,
            ls_pnodtx_h       TYPE pnodtx,
            ls_pnodtx_v       TYPE pnodtx,
            ls_posvid         TYPE posvid,
            lt_pnwtyv         TYPE pwty_pnwtyv_li_tab,
    1:N Measurement documents
            lt_wtyv_imrg   TYPE wtyv_imrg_tab ,
            lt_wtyv_imrg_dyn TYPE wtyv_imrg_dyn_tab,
            ls_wtyv_imrg   TYPE wtyv_imrg ,
            ls_wtyv_imrg_dyn TYPE wtyv_imrg_dyn,
            lt_paltid         TYPE STANDARD TABLE OF paltid
                                 WITH KEY paguid,
            lt_pnodid         TYPE STANDARD TABLE OF pnodid
                                 WITH KEY pnguid,
            lt_pnodtx         TYPE STANDARD TABLE OF pnodtx
                                 WITH KEY pnguid spras pntxcnt,
            lt_pnodtx_from    TYPE ppet_ppetx_li_tab,
            lt_palttx         TYPE STANDARD TABLE OF palttx
                                 WITH KEY paguid spras patxcnt,
            lt_prelid         TYPE STANDARD TABLE OF prelid
                                 WITH KEY prguid,
            lt_posvid         TYPE STANDARD TABLE OF posvid
                                 WITH KEY pvguid,
            lt_posvid_version TYPE STANDARD TABLE OF posvid
                                 WITH KEY pvguid,
            ls_bapiitem       TYPE bapi2222item,
            ls_bapiitem_c     TYPE bapi2222itemchange,
            ls_bapiheader     TYPE bapi2222headerchange,
            ls_bapiversion_c  TYPE bapi2222versionchange,
            ls_bapiversion    TYPE bapi2222version,
            ls_bapitext       TYPE bapi2222longtext,
            lt_bapitext       TYPE TABLE OF bapi2222longtext,
            ls_measure        TYPE bapi2222measure,
            ls_pricing        TYPE bapi2222pricing,
            ls_version_rel    TYPE bapi2222versionrelation,
            ls_item_rel       TYPE bapi2222itemrelation,
            ls_return         TYPE bapiret2,
            lt_extensionin    TYPE TABLE OF bapiparex,
            ls_handle_guid    TYPE pwty_handle_guid,
            lt_handle_guid    TYPE SORTED TABLE OF pwty_handle_guid
                                 WITH UNIQUE KEY handle,
            lv_logsys         TYPE logsys,
            lv_header_guid    TYPE wty_guid,
            lv_dummy          TYPE string,
            lt_texts          TYPE wty_texts_tab,
            lt_texts_all      TYPE wty_texts_tab,
            ls_texts          TYPE wty_texts,
            ls_pnwtyh_dia     TYPE  wty_pnwtyh_dia,
            ls_pnwtyh_dia_old TYPE wty_pnwtyh_dia,
            ls_pnwtyh_old     TYPE pnwtyh,
            lt_pnwtyh_dia     TYPE wty_pnwtyh_dia_tab,
            lt_pnwtyh_old     TYPE wty_pnwtyh_dia_tab,
            ls_pnwtyv_dia     TYPE wty_pnwtyv_dia,
            lt_pnwtyv_dia     TYPE wty_pnwtyv_dia_tab,
            lt_pnwtyv_old     TYPE wty_pnwtyv_dia_tab,
            ls_pvwty_dia      TYPE wty_pvwty_dia,
            lt_pvwty_dia      TYPE wty_pvwty_dia_tab,
            lt_pvwty_dia_v    TYPE wty_pvwty_dia_tab,
            lt_pvwty_dia_old  TYPE wty_pvwty_dia_tab,
            lt_pvwty_old      TYPE pwty_pvwty_li_tab,
            lt_pvwty_dyn_old  TYPE pwty_pvwty_dyn_tab,
            lt_pnwtyh_dyn     TYPE pwty_pnwtyh_dyn_tab,
            lt_pnwtyv_dyn     TYPE pwty_pnwtyv_dyn_tab,
            lt_pvwty_dyn      TYPE pwty_pvwty_dyn_tab,
            lt_pvwty_dyn_v    TYPE pwty_pvwty_dyn_tab,
            lt_pvwty_v        TYPE pwty_pvwty_li_tab,
            ls_pnwtyh_dyn     TYPE wty_pnwtyh_dyn_g,
            ls_pnwtyv_dyn     TYPE wty_pnwtyv_dyn_g,
            ls_pnwtyv_dyn_old TYPE wty_pnwtyv_dyn_g,
            ls_pvwty_dyn      TYPE wty_pvwty_dyn_g,
            lv_short_text     TYPE text40,
            ls_text_lines     TYPE tline,
            lt_text_lines     TYPE tlinetab,
            ls_text_header    TYPE thead,
            lv_created        TYPE c,
            lt_impt           TYPE TABLE OF wty_impt,
            ls_impt           TYPE wty_impt,
            ls_select         TYPE ls_select,
            lt_select         TYPE TABLE OF ls_select,
            lv_mdocm          TYPE wty_mdocm,
            lv_v_point        TYPE wty_pvwty_dyn-measure_point,
            lv_i_point        TYPE wty_pvwty_dyn-measure_point,
            lv_read_mpoint    TYPE c,
            lt_partner        TYPE wty_partner_buffer_tab,
            ls_partner        TYPE wty_partner_buffer,
            lv_guid_from      TYPE pvs_guid,
            lv_guid_to        TYPE pvs_guid,
            lv_new_item       TYPE flag,
            lv_delete         TYPE flag,
            lv_subrc          TYPE sy-subrc,
            lt_messages       TYPE tsmesg,
            ls_messages       TYPE smesg,
            ls_bapiret2       TYPE bapiret2,
            ls_cwty001        TYPE cwty001,
            lt_cwty001        TYPE TABLE OF cwty001,
            lt_item_guid      TYPE wty_guidlist_tab,
            ls_item_kschl     TYPE wty_item_kschl,
            lt_item_kschl     TYPE wty_item_kschl_tab,
            ls_update         TYPE bapi2222update,
            lv_index          TYPE sy-tabix,
            lt_dd03p          TYPE TABLE OF dd03p WITH HEADER LINE,
            ls_header_kschl   TYPE wty_header_kschl,
            lt_header_kschl   TYPE wty_header_kschl_tab.
    DATA: lt_pnguid_tab TYPE ppet_guid.
    *--- Get the Claim header data
    CALL FUNCTION 'PVSDBWTY_PNWTYH_GET_BY_CLMNO'
       EXPORTING
         iv_clmno       = viqmel-yy_wty_clmno
       IMPORTING
         et_pnwtyh      = lt_pnwtyh
         et_pnodid      = lt_pnodid
         et_pnguid_tab  = lt_pnguid_tab
         es_pnwtyh      = es_pnwtyh
       EXCEPTIONS
         no_claim_found = 1
         OTHERS         = 2.
    CHECK sy-subrc EQ 0.
    DATA:
    *lt_claim_version LIKE bapi2222versionchange
                               OCCURS 0 WITH HEADER LINE,
         lt_claim_item    LIKE bapi2222itemchange
                               OCCURS 0 WITH HEADER LINE,
         lt_claim_text    LIKE bapi2222longtext
                               OCCURS 0 WITH HEADER LINE,
         lt_claim_measure LIKE bapi2222measure
                               OCCURS 0 WITH HEADER LINE,
         lt_claim_pricing LIKE bapi2222pricing
                               OCCURS 0 WITH HEADER LINE,
         lt_version_rel   LIKE bapi2222versionrelation
                               OCCURS 0 WITH HEADER LINE,
         lt_item_rel      LIKE bapi2222itemrelation
                               OCCURS 0 WITH HEADER LINE,
         lt_return        LIKE bapiret2
                               OCCURS 0 WITH HEADER LINE,
         ls_claim_header  LIKE bapi2222headerchange
                                  occurs 0 with header line.
    ls_claim_header  LIKE    wty_pnwtyh_dia
                                   occurs 0 with header line.
    data: begin of it_qmel occurs 0,
         wtyno like qmel-YY_WTY_clmno,
         end of it_qmel.
    select-options:
                    Tracking for QMEL-YY_TRACKING.
              wtyno    for pnwtyh-clmno.
    select YY_wty_clmno from qmel into TABLE it_qmel where yy_tracking
    IN Tracking.
    write :/ SY-DBCNT.
    if sy-subrc <> 0.
    message 000(zwty) with 'Enter valid claim no'.
    write :/ 'record not found'.
    endif.
    loop at it_qmel.
    write: / it_qmel-wtyno.
    clear lt_pnwtyh_dia.
    *refresh lt_pnwtyh_dia.
      clear    ls_pnwtyh_dia.
    refresh ls_pnwtyh_dia.
      CALL METHOD cl_ppeliwty_cntl=>claim_read_db
       EXPORTING
         iv_lock_flg         = ppet_true
         iv_msg_opt          = ppet_msg_options-do_error
         iv_with_partner     = ppet_true
         iv_with_customizing = ppet_true
         iv_with_node_text   = ppet_true
             iv_clmno            = it_qmel-wtyno
           IMPORTING
         et_pnodtx           = lt_pnodtx
            et_pnwtyh           = lt_pnwtyh_dia
          et_paltid           = lt_paltid
          et_pnwtyv           = lt_pnwtyv_old
          et_posvid           = lt_posvid
          et_pvwty            = lt_pvwty_dia_old
          et_pnodid           = lt_pnodid
          et_prelid           = lt_prelid
          et_cwty001          = lt_cwty001
          et_wtyv_imrg_dyn    = lt_wtyv_imrg_dyn
           EXCEPTIONS
             authority_failed    = 2
             OTHERS              = 1.
    *--Header details.
      LOOP AT lt_pnwtyh_dia INTO ls_pnwtyh_dia.
       MOVE-CORRESPONDING ls_pnwtyh_dia TO ls_claim_header.
       MOVE-CORRESPONDING ls_pnwtyh_dia TO ls_pnwtyh.
       APPEND ls_pnwtyh_dyn TO lt_pnwtyh_dyn.
       APPEND ls_pnwtyh     TO lt_pnwtyh.
       CLEAR: ls_pnwtyh_dyn,
              ls_pnwtyh_dia.
    ls_claim_header-clmno   = ls_pnwtyh-clmno.
    ls_claim_header-clmty = ls_pnwtyh-clmty.
      write :/ ls_claim_header-clmno.
       ls_claim_header-ext_no     = ls_pnwtyh-refno.
       ls_claim_header-prec_claim = ls_pnwtyh-oldcn.
       ls_claim_header-author_no  = ls_pnwtyh-autno.
       ls_claim_header-author_by  = ls_pnwtyh-autna.
       ls_claim_header-pers_resp  = ls_pnwtyh-clerk.
       ls_claim_header-objecttype = ls_pnwtyh-relty.
       ls_claim_header-objectkey  = ls_pnwtyh-relob.
       ls_claim_header-objectno   = ls_pnwtyh-relob_ext.
       ls_claim_header-obj_group  = ls_pnwtyh-relot.
       ls_claim_header-obj_date   = ls_pnwtyh-reldt.
       ls_claim_header-partner    = ls_pnwtyh-parnr.
       ls_claim_header-role_par   = ls_pnwtyh-parvw.
       ls_claim_header-co_objnr   = ls_pnwtyh-objnr.
       ls_claim_header-pro_state  = ls_pnwtyh-astate.
       ls_claim_header-plant      = ls_pnwtyh-werks.
       ls_claim_header-notif_no   = ls_pnwtyh-qmnum.
       ls_claim_header-servdate   = ls_pnwtyh-refdt.
       ls_claim_header-recall_date   = ls_pnwtyh-cbactiondt.
       ls_claim_header-descriptn   = ls_pnwtyh-h_pntext.
       ls_claim_header-objecttype2 = ls_pnwtyh-relty.
       ls_claim_header-objectkey2  = ls_pnwtyh-relob.
       ls_claim_header-objectno2   = ls_pnwtyh-relob_ext.
       ls_claim_header-serialnumber   = ls_pnwtyh-serno.
       ls_claim_header-serialnumber2  = ls_pnwtyh-serno2.
        append ls_claim_header.
      ENDLOOP.
    endloop.
    loop at ls_claim_header.
      write :/ ls_claim_header-clmno.
    endloop.
        EXPORTING
          i_parent = go_custom_container.
    *select qmelyy_tracking pnwtyhwty_clmno pnwtyhyy_refno pnwtyhastate
    *pnwtyh~parnr into table it_pnwtyh where inner join qmel on qmel-
    *loop at it_pnwtyh.
       write :/  it_pnwtyh-yy_refno.
    endloop.

    Hi,
    I have seen one code in book Common SAP R/3 Functions Manual
    By William Lawlor. which converts local currency to foreign currency.
    I made bit changes in parameters like made foreigh currency as USD.
    Execute the program and check.
    Data: xrate type f,
          famt type p,
          ffact type f,
          lfact type f.
    parameters:fcurr like TCURC-WAERS default 'USD',
               lcurr like TCURC-WAERS,
    lamt type p.
    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
      EXPORTING
      CLIENT                  = SY-MANDT
        DATE                    = sy-datum
        FOREIGN_CURRENCY        = fcurr
        LOCAL_AMOUNT            = lamt
        LOCAL_CURRENCY          = lcurr
      RATE                    = 0
      TYPE_OF_RATE            = 'M'
      READ_TCURR              = 'X'
    IMPORTING
       EXCHANGE_RATE           = xrate
       FOREIGN_AMOUNT          = famt
       FOREIGN_FACTOR          = ffact
       LOCAL_FACTOR            = lfact
      EXCHANGE_RATEX          =
      DERIVED_RATE_TYPE       =
      FIXED_RATE              =
    EXCEPTIONS
       NO_RATE_FOUND           = 1
       OVERFLOW                = 2
       NO_FACTORS_FOUND        = 3
       NO_SPREAD_FOUND         = 4
       DERIVED_2_TIMES         = 5
       OTHERS                  = 6
    IF SY-SUBRC = 0.
    write:/ lamt, 'converted form', lcurr, 'to', fcurr, 'is:', famt.
    else.
    write:/ lamt, 'not converted'.
    ENDIF.
    Hope this helps you.
    Cheers!!
    VEnk@
    Edited by: Venkat Reddy on Oct 31, 2008 5:14 PM

Maybe you are looking for

  • Problem with DAQMX on a 6025E !!

    Problem with DAQMX on a 6025E I work on a DAQ 6025E and I can't use the example "Write Dig Port.vi" and all others example on digital output with DAQMX. There isn't any hardware failure because the same installation functions correctly with the tradi

  • Does Robohelp HTML V 7.02.001 support Arabic language to generate context sensitive help

    Kindly let us know URGENTLY if RoboHelp 7.02.001 supports Arabic language to generate context sensitive help in Arabic. If RoboHelp does not support, let us know if there is any other workaround solution or third party integration tool that may help

  • Derived table query size limit 65KB?

    Hi.  When in Edit Derived Table, if I paste a query larger than about 65KB, the end of the query will be cut off.  Then I must create multiple Derived Tables.  Has anyone else experienced this?  Do you find the limit to be about 65KB? Thanks, Mike

  • Sessions Editor acting strangely (10.1.2)

    Hello, I have a few odd problems with the Session Editor. Maybe its my windows platform but I cant explain it. I make my changes to the sessions.xml using the Session Editor and save them to the file system. As long as I am logged in to my windows it

  • Please help array and tables

    value for my parameterp_yymm :=(1001,1002,:,:,1005,:,:,1008,,:,:,:,:,1101,1102) colon rep as non selected value i need to get position of all values like 1001 -1 1002 -2 1102-14 then my ouput should like this (yynnynnynnnnyy) create or replace FUNCTI