Passing diff internaltables in single perform statement

hi all,
hw can v pass diff internal tables to a single form.
4 internal tables with diff structures
each time i have to pass 1 internal table to that form.... hw can it possible, can anybody explian me with example.....
<REMOVED BY MODERATOR>
thanks
Edited by: Alvaro Tejada Galindo on Jan 29, 2008 9:59 AM

hi all,
thanx for reply... but i did not understand hw to pass internal tables,
for expample i have 4 internal tables with diff structures.
it_mara
it_mard
it_vbrp
it_vbrk
1)in perform routine using it_mara.
in form routine it_mara type <table name>
endform.
2nd time in perform using it_mard.
in perfrom v cna change table but hw can v change in form.
kindly reply if u know the solution
thanks

Similar Messages

  • Passing itab in a perform statement

    Hi Experts,
    In a Fucn Module, I need to write a perform statement and the corresponding FORM lies in an include. I need to pass an internal table(itab) & workarea(wa_itab) in perform as below :
    Declaration of itab:
    types: BEGIN OF ty_out1,
             f1(16) TYPE c,
             f2 TYPE wrbtr,
           END OF ty_out1.
    data : itab type standard table of ty_out1,
              wa_itab type ty_out1,
    PERFORM <form name> tables itab
      USING wa_itab
      test1.
    Dbl click on above perform takes us to an include prog and the form is declared as below -
    what should be the syntax of the FORM in INCLUDE statement.
    Note: I should not use the top include of the main prog for any declarations.
    form search_slash tables ptab2 like itab
                   using wa2_itab like wa_itab
                   test2 .
    Now what should be the syntax of the form above? Is the above right?
    Please suggest
    Thanks
    Dan

    Hi,
    If you want to pass only the internal table with header line,
    then use tables ptab2 structure wa2_itab
    For internal table with header line use:
    tables ptab2 like wa2_itab
    or
    tables ptab2[ ] like wa2_itab.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Passing tables with PERFORM statement

    Hi all,
    There is a table returned by a function module ZCDAPO_MATNR_CHECK_FOR_QUOTA .
    I want to use the table returned by this FM  in a subroutine.
    So i pass this table thru FORM statement.
    within  PERFORM  and ENDFORM i want to use the data in this table
    and do some manipulation.
    but i am getting an error saying for typing TABLES parameter only table types should be used
    can anyone tell me where i am going wrong or please tell me how use tables in this PERFORM statement.for reference i will paste the code below,
    TYPES  : BEGIN OF x_quota     ,
                   trpid type ztrpid    ,
                   quota TYPE decv1_3   , 
                   END OF x_quota       .
    DATA :  it_qheader TYPE TABLE OF zapo_trqtah,
                 wa_it_qheader LIKE LINE OF it_qheader.
    DATA:    it_qitem TYPE TABLE OF zapo_trqtap,
                 wa_it_qitem LIKE LINE OF it_qitem.
    DATA   : it_quotavalue      TYPE TABLE OF x_quota                    ,
                  wa_it_quotavalue   LIKE LINE  OF it_quotavalue              .
    CALL FUNCTION 'ZCDAPO_MATNR_CHECK_FOR_QUOTA'
          EXPORTING
            i_matnr            = 'AATESTQUOTA2'
            i_werks            = '5034'
          IMPORTING
            e_quota_exist_flag = lv_flag
          TABLES
            t_zapo_trqtap      = it_qitem
            t_zapo_trqtah      = it_qheader
          EXCEPTIONS
            invalid_input      = 1
            OTHERS             = 2.
    perform f_loadquota_apo TABLES it_qitem.
    form f_loadquota_apo tables it_qitem type zapo_trqtap.
                     LOOP AT it_qitem INTO wa_it_qitem.
                     wa_it_quotavalue-trpid = wa_it_qitem-ztrpid.
                     wa_it_quotavalue-quota = wa_it_qitem-zquota / lv_sum.
                     append wa_it_quotavalue to it_quotavalue.
                     endloop.
    endform.

    Hi..
    Using TABLES is like obselete.
    So change your code like this:
    Call the Subroutine like this:
    <b>perform f_loadquota_apo using it_qitem[].</b>
    You can change the Definition of Form like this:
    <b>form f_loadquota_apo USING  it_qitem LIKE zapo_trqtap[].</b>
    LOOP AT it_qitem INTO wa_it_qitem.
    wa_it_quotavalue-trpid = wa_it_qitem-ztrpid.
    wa_it_quotavalue-quota = wa_it_qitem-zquota / lv_sum.
    append wa_it_quotavalue to it_quotavalue.
    endloop.
    endform.
    <b>Reward if Helpful</b>

  • Diff between select single and select upto 1 rows.

    Hello aLL,
    PL tell what is technical diff between select single and select upto 1 rows and how it is affecting the performance.
    Rushikesh

    Hi
    Knowing when to use SELECT SINGLE or SELECT ... UP TO 1 ROWS
    A lot of people use the SELECT SINGLE statement to check for the existence of a value in a database. Other people prefer to use the 'UP TO 1 ROWS' variant of the SELECT statement.
    So what's the difference between using 'SELECT SINGLE' statement as against a 'SELECT .... UP TO 1 ROWS' statement ?
    If you're considering the statements
    SELECT SINGLE field INTO w_field FROM table.
    and
    SELECT field INTO w_field FROM table UP TO 1 ROWS. ENDSELECT.
    then looking at the result, not much apart from the extra ENDSELECT statement. Look at the run time and memory usage and they may be worlds apart.
    Why is this ?? The answer is simple.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Get the difference ??
    If not, here is a good example, credit for this example goes to Richard Harper, a friend of mine on sapfans.com :
    Create a Ztable called ZDifference with 2 fields in it, MANDT of type MANDT and POSNR of type POSNR. Make sure both of these are keys. Also create a table maintenance dialog for it (SE11->Utilities->Table Maintenance Generator). Fill the table with ten rows 000001-000010.
    Then run the program shown below:
    Code:
    Program: Z_Difference
    Purpose: A program that demonstrates the difference
    between SELECT SINGLE and SELECT UP TO n ROWS.
    This program requires the data table Z_DIFFERENCE
    to have been created according to the structure
    outlined in the text above and populated with
    at least 10 records.
    Creation Date: 21/04/2004
    Requested By:
    Reference Doc:
    Author: R Harper
    Modification History:
    Date Reason Transport Who
    Report Z_Difference
    Message-id 38
    Line-Size 80
    Line-Count 0
    No Standard Page Heading.
    Start-Of-Selection.
    Data: w_Single type Posnr,
    t_Rows type standard table of Posnr
    initial size 0
    with header line.
    Select single Posnr
    from zDifference
    into w_Single.
    Select Posnr
    into table t_Rows
    from zDifference
    up to 1 rows
    order by Posnr descending.
    Write :/ 'Select single:', w_Single.
    Skip 1.
    Write :/ 'Up to 1 rows :'.
    Loop at t_Rows.
    Write t_Rows.
    EndLoop.
    You should see the output:
    Select single: 000001
    Up to 1 rows : 000010
    The first 'SELECT' statement selected the first record in the database according to any selection criterion in the 'WHERE' clause. This is what a 'SELECT SINGLE' does. The second 'SELECT' has asked the database to reverse the order of the records before returning the first row of the result.
    In order to be able to do this the database has read the entire table, sort it and then return the first record. If there was no ORDER BY clause then the results would have been identical (ie both '000001') but the second select if given a big enough table to look at would be far slower.
    Note that this causes a problem in the Extended Program Check if the full key is not specified in a 'SELECT SINGLE'. Replacing the 'SELECT SINGLE' by an "UP TO 1 ROWS" will give the same exact results without any warning but the program will run slower and consume more memory. This is a good example of a warning that we should ignore... considering you are sure of what you are doing !!

  • Perform statement in SAP scripts

    Hi experts,
    My requirement is that I don't want to display line items for particular customer with a particular item category, For this purpose I was asked to create a Z table with fields customer number(KUNNR) and Item category(PSTYV) and I have to make changes only in layout but not in driver program. So how do i do it? How to write preform statement in form layout which satisfies my requirement. And also in this perform statement I have to check if that customer and item category exists in that Z table. If so then I should not display the line item in the output else the line item should be displayed.
    Thanks in Adv.
    Vasu

    Hi,
    write this in script (Ex:Main Window)
    /:           PERFORM GET_COMM_CODE_DESC IN PROGRAM ZVPPACKL
    /:           USING &VBDPL-MATNR&
    /:           USING &VBDPL-WERKS&
    /:           USING &VBDPL-STAWN&
    /:           USING &VBDKL-ALAND&
    /:           CHANGING &STAWN&
    /:           CHANGING &TEXT1&
    /*           Begin of Insert -- PRAVIKAN -- DV2K933249 -- PR091808
    /:           CHANGING &W_COMMODITY_EU&
    /:           CHANGING &W_COMMODITY_DESC_EU&
    /*           End of Insert -- PRAVIKAN -- DV2K933249 -- PR091808
    /:           ENDPERFORM
    Driver program (ZVPPACKL)
    FORM get_comm_code_desc TABLES intab STRUCTURE itcsy
                                   outtab STRUCTURE itcsy.
      DATA: stawn LIKE t604t-stawn,
           matnr LIKE marc-matnr,                               "CL060501
           werks LIKE marc-werks,                               "CL060501
            land1 LIKE t604t-land1,
            text1 LIKE t604t-text1,
            w_commodity_eu       TYPE stawn,                    "PR092908
            w_commodity_desc_eu  TYPE bezei40.                  "PR092908
      READ TABLE intab WITH KEY name = 'VBDPL-MATNR'.           "CL060501
      matnr = intab-value.                                      "CL060501
      READ TABLE intab WITH KEY name = 'VBDPL-WERKS'.           "CL060501
      werks = intab-value.                                      "CL060501
      land1 = intab-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = matnr
        IMPORTING
          output = matnr.
      CLEAR: stawn,
             text1.
      SELECT SINGLE stawn
              INTO stawn
              FROM marc
             WHERE matnr = matnr
               AND werks = '3101'.
      IF NOT stawn IS INITIAL.
        SELECT SINGLE text1
                 INTO text1
                 FROM t604t
                WHERE spras = 'EN'
                  AND land1 = 'US'
                  AND stawn = stawn.
      ENDIF.
      CLEAR: w_commodity_eu,
             w_commodity_desc_eu.
      SELECT SINGLE stawn
              INTO w_commodity_eu
              FROM marc
             WHERE matnr = matnr
               AND werks = '0010'.
      IF NOT w_commodity_eu IS INITIAL.
        SELECT SINGLE text1
                 INTO w_commodity_desc_eu
                 FROM t604t
                WHERE spras = 'EN'
                  AND land1 = 'GB'
                  AND stawn = w_commodity_eu.
      ENDIF.
      READ TABLE outtab WITH KEY name = 'STAWN'.                "CL060501
      outtab-value = stawn.                                     "CL060501
      MODIFY outtab INDEX sy-tabix.
      READ TABLE outtab WITH KEY name = 'TEXT1'.
      outtab-value = text1.
      MODIFY outtab INDEX sy-tabix.
      READ TABLE outtab WITH KEY name = 'W_COMMODITY_EU'.
      IF sy-subrc EQ 0.
        outtab-value = w_commodity_eu.
        MODIFY outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE outtab WITH KEY name = 'W_COMMODITY_DESC_EU'.
      IF sy-subrc EQ 0.
        outtab-value = w_commodity_desc_eu.
        MODIFY outtab INDEX sy-tabix.
      ENDIF.
    ENDFORM.                    "GET_COMM_CODE_DESC
    Regards
    Krishna

  • HOW CAN I  USE MULTIPLE INNERJOINS IN A SINGLE SELECT STATEMENT?

    HI,
    I AM SHABEER AHMED,
    I AM GETTING AN ERROR WHILE I ATTEMPT TO EXECUTE A SELECT STATEMENT WITH MULTIPLE INNER JOINS . BECOZ I WANT TO FETCH ITEM DATA, PARTNER DATA  BASED ON HEADER DATA .
    THEN OF COURSE I HAVE FETCH DATA FROM VBAK VBAP VBKD SO LZ SEND ME THE SOLUTION.
    BYE

    Hi,
    1.Just see this:
    SELECT * INTO CORRESPONDING FIELD OF TABLE itab
    FROM t1 INNER JOIN t2 ON t1f4 EQ t2f4
    INNER JOIN t3 ON t2f5 EQ t3f5 AND
    t2f6 EQ t3f6 AND
    t2f7 EQ t3f7.
    2.But better to use for all entries.It increases the performance.
    FOR ALL ENTRIES
    Tabular Conditions
    The WHERE clause of the SELECT statement has a special variant that allows you to derive conditions from the lines and columns of an internal table:
    SELECT ... FOR ALL ENTRIES IN <itab> WHERE <cond> ...
    <cond> may be formulated as described above. If you specify a field of the internal table <itab> as an operand in a condition, you address all lines of the internal table. The comparison is then performed for each line of the internal table. For each line, the system selects the lines from the database table that satisfy the condition. The result set of the SELECT statement is the union of the individual selections for each line of the internal table. Duplicate lines are automatically eliminated from the result set. If <itab> is empty, the addition FOR ALL ENTRIES is disregarded, and all entries are read.
    The internal table <itab> must have a structured line type, and each field that occurs in the condition <cond> must be compatible with the column of the database with which it is compared. Do not use the operators LIKE, BETWEEN, and IN in comparisons using internal table fields. You may not use the ORDER BY clause in the same SELECT statement.
    You can use the option FOR ALL ENTRIES to replace nested select loops by operations on internal tables. This can significantly improve the performance for large sets of selected data.
    Example for ALL ENTRIES
    DATA: TAB_SPFLI TYPE TABLE OF SPFLI,
    TAB_SFLIGHT TYPE SORTED TABLE OF SFLIGHT
    WITH UNIQUE KEY TABLE LINE,
    WA LIKE LINE OF TAB_SFLIGHT.
    SELECT CARRID CONNID
    INTO CORRESPONDING FIELDS OF TABLE TAB_SPFLI
    FROM SPFLI
    WHERE CITYFROM = 'NEW YORK'.
    SELECT CARRID CONNID FLDATE
    INTO CORRESPONDING FIELDS OF TABLE TAB_SFLIGHT
    FROM SFLIGHT
    FOR ALL ENTRIES IN TAB_SPFLI
    WHERE CARRID = TAB_SPFLI-CARRID AND
    CONNID = TAB_SPFLI-CONNID.
    LOOP AT TAB_SFLIGHT INTO WA.
    AT NEW CONNID.
    WRITE: / WA-CARRID, WA-CONNID.
    ENDAT.
    WRITE: / WA-FLDATE.
    ENDLOOP.
    INNER JOINS
    In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:
    SELECT...
    FROM <tab> INNER JOIN <dbtab> AS <alias> ON <cond> <options>
    where <dbtab> is a single database table and <tab> is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.
    A join expression links each line of <tab> with the lines in <dbtab> that meet the condition <cond>. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If <dbtab> does not contain any lines that meet the condition <cond>, the line from <tab> is not included in the selection.
    The syntax of the <cond> condition is like that of the WHERE clause, although individual comparisons can only be linked using AND. Furthermore, each comparison must contain a column from the right-hand table <dbtab>. It does not matter on which side of the comparison it occurs. For the column names in the comparison, you can use the same names that occur in the SELECT clause, to differentiate columns from different database tables that have the same names.
    The comparisons in the condition <cond> can appear in the WHERE clause instead of the ON clause, since both clauses are applied equally to the temporary table containing all of the lines resulting from the join. However, each join must contain at least one comparison in the condition <cond>.
    Example for INNER JOINS
    REPORT demo_select_inner_join.
    DATA: BEGIN OF wa,
    carrid TYPE spfli-carrid,
    connid TYPE spfli-connid,
    fldate TYPE sflight-fldate,
    bookid TYPE sbook-bookid,
    END OF wa,
    itab LIKE SORTED TABLE OF wa
    WITH UNIQUE KEY carrid connid fldate bookid.
    SELECT pcarrid pconnid ffldate bbookid
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM ( ( spfli AS p
    INNER JOIN sflight AS f ON pcarrid = fcarrid AND
    pconnid = fconnid )
    INNER JOIN sbook AS b ON bcarrid = fcarrid AND
    bconnid = fconnid AND
    bfldate = ffldate )
    WHERE p~cityfrom = 'FRANKFURT' AND
    p~cityto = 'NEW YORK' AND
    fseatsmax > fseatsocc.
    LOOP AT itab INTO wa.
    AT NEW fldate.
    WRITE: / wa-carrid, wa-connid, wa-fldate.
    ENDAT.
    WRITE / wa-bookid.
    ENDLOOP.
    Regards,
    Shiva Kumar(Reward if helpful).

  • How to use perform statements in sap scripts

    how to use perform statements in sap scripts . and pls send me one progam for this
    thnaks
    raja

    Hi Raja,
    <b>PERFORM</b> key work is used to include subroutine in sapscript form...
    But the processing is lttle bit different form the one we use in ABAP.
    Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
    Check out the example below to see how this is used..
    <b>Definition in the SAPscript form:</b>
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    <b>Coding of the calling ABAP program:</b>
    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.
    Hope this is clear to understand...
    Enjoy SAP.
    Pankaj Singh.

  • HOW TO USE PERFORM STATEMENT IN SMARTFORMS

    Hi,
    Can anyone tell me how to use call subroutine in smartform?
    Thanks & Regards,
    Gauarv.

    Hi,
    Hope this helps you..
    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.

  • Problem with perform statement

    Hi All,
        I 'm in PAI event. i'm writing code for a check box. there
              CASE SY-UCOMM.
                  when 'FC'.
                 here i need to write a select statement like
         select field from database into itab where field1 = itab1-field1.
                    This itab1 data is in the following form.
    FORM user_comm USING r_ucomm LIKE sy-ucomm
                                      rs_selfield TYPE slis_selfield.
    so how can i use this form in my PAI?
    can anybody help me.
    thanks
    g.s.naidu

    Hi can anybody tell me how can i write a perform statement for a form statement.
    i want to write a perform statement for this
    " FORM user_double_click_on_sumry USING r_ucomm LIKE sy-ucomm
                                      rs_selfield TYPE slis_selfield.
    this is from alv grid function module   when we try to move to next screen we pass this parameter.
                i_callback_user_command = 'user_double_click_on_sumry'.
    now i want to use this form statement some where else. so can anybody tell me how can i write the perform for the above form statement.
    thanks
    g.s.naidu

  • Optimize single update statement

    Hi all, I've got a table with about 50 millions of rows (a spatial network...) and I have to issue an update statement without any where condition.
    The statement is: UPDATE NODE SET ACTIVE='Y';
    Which is the most efficient way to do this?
    A single UPDATE statement, the forall loop or an incremental FOR loop with partial commit (each 1000 rows i.e.)?
    Thanks
    Lorenzo

    Or a single MERGE statement.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6407993912330#57387981485901
    You'd test with a subset before to see what performs fastest, ofcourse...

  • Sap script perform statement.

    hi all,
       i have a problem with modifying standard sap script form. i have added a field in the line item of my form using perform statement in sap script. but only the corresponding to last line item is getting displayed for all.please help me on this issue my code and sap script is as follows.
    **&      Form  material_wt
         -->IN_TAB     text
         -->OUT_TAB    text
    FORM MATERIAL_WT TABLES in_tab STRUCTURE itcsy
                            out_tab STRUCTURE itcsy.
      DATA : BEGIN OF IT_MAT OCCURS 0,
               ZEILE LIKE J_1IEXCDTL-ZEILE,
               MENGE LIKE J_1IEXCDTL-MENGE,
               MATNR LIKE J_1IEXCDTL-MATNR,
               NTGEW TYPE MARA-NTGEW,
             END OF IT_MAT.
      DATA : V_DOCNO TYPE J_1IEXCDTL-DOCNO,
             V_NTWT TYPE CHAR20.
           READ TABLE in_tab WITH KEY name = 'J_1IEXCDTL-DOCNO'.
           CHECK sy-subrc = c_zero.
           V_DOCNO = in_tab-value.
           SELECT ZEILE MATNR MENGE INTO CORRESPONDING FIELDS OF TABLE IT_MAT FROM J_1IEXCDTL
                                  WHERE DOCNO = V_DOCNO AND TRNTYP = '57FC'.
                   LOOP AT IT_MAT.
                         SELECT SINGLE NTGEW INTO IT_MAT-NTGEW FROM MARA WHERE MATNR = IT_MAT-MATNR.
                   modify it_mat.
                  ENDLOOP.
             loop at it_mat.
                       IF not it_mat[] IS INITIAL.
                       READ TABLE out_tab WITH KEY name =  'NETWT'.
                                  IF sy-subrc = 0.
                                    V_NTWT = IT_MAT-NTGEW * IT_MAT-MENGE.
                                        CONDENSE:V_NTWT.
                                    out_tab-value  =  V_NTWT.
                                    MODIFY out_tab INDEX sy-tabix.
                                  ENDIF.
                        ENDIF.
             endloop.
    endform.
    and my perform statement is as follows,
    /E  ITEM_VALUES
    /:   PERFORM MATERIAL_WT IN PROGRAM ZMM_RPT_CHALLAN
    /:   USING &J_1IEXCDTL-DOCNO&
    /:   CHANGING &NETWT&
    /:   ENDPERFORM
    I1  &J_1IEXCDTL-ZEILE&,,&J_1IEXCDTL-MATNR&,,&NETWT&

    answered

  • Multiple condtions in a single if Statement in .rtf templete of Bi Publishe

    Hi ,
    I want to use a single if statement with multiple condition .
    For Example : If :Parameter1=10 and Parameter2=10 and Parameter3=30
    then < ' mseesge '>
    end if ;
    Any body Please suggest me how can i do it in the .rtf .
    Thanks,
    Mike .
    Edited by: user3449250 on Feb 27, 2009 7:53 AM

    Hi Mike,
    for example
    <?if:JOB='MANAGER' and ENAME='JONES'?> XXX <?end if?>
    Regards
    Rainer

  • Is it posible to compare 2 variales in single if statement in BIP report?

    Hi,
    I want to know following things reg BI Publisher-
    1. Is it possible to compare 2 variables in single if statement in BI Publisher report as follows-
    <?if: xdoxslt:get_variable($_XDOCTX,'RVal1') = xdoxslt:get_variable($_XDOCTX,'RVal2')?>
    2. Is it possible to compare 1 variable with 1 xml tag in single if statement in BI Publisher report?
    eg - <?if: ObjId = xdoxslt:get_variable($_XDOCTX,'RVal2')?>
    We are having 2groups QuoteItem and QuoteItemXA. QuoteItem is a parent group and QuoteItemXA is a child group of QuoteItem. We want to compare value of field QuoteItemId from QuoteItem group with value of field ObjId from QuoteItemXA group in inner for loop(QuoteItemXA for loop).
    We want to display values of one field only when values of these two fields matches. Hence we are taking 1 variable for QuoteItemId and comparing it as follows -
    <?if: ObjId = xdoxslt:get_variable($_XDOCTX,'RVal2')?>
    The RVal2 variable is already initialized and assigned value of QuoteItemId in outer for loop.
    But above for loop is not filtering out any data.
    When we tried giving hardcoded values as -
    <?if: ObjId = '1-151QGPO' and xdoxslt:get_variable($_XDOCTX,'RVal2') = '1-151QGPO'?> then its showing report only for this QuoteItemId.
    Please suggest us the solution- how to compare above two fields?
    Regards,
    Rakesh

    hello Rakesh,
    Were you able to fix this issue ?
    We have a BIP report on the Quote , Line Item and XA entities and we have the same issue with duplication of attributes due to use of Hierarchy parent lKey. I am assuming you would be having the same issue as well; as a result of which XA.ObjId is compared with QLineItem.Id

  • Can we use Perform statement in start routine ,Form and endform.

    Hi,
    Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
    Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
          Form ABC,
          ......<ABAP> code .....
          Endform.

    Hi,
    In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
    But you can surely try both the approaches.
    Reards,
    Durgesh.

  • Produce report NOT based on a single sql statement

    I want to produce a tabular report based on a series of sql statments. Specifically, a report of managers that wil include counts of employees that are in other tables using differing criterias.
    Name Count Count
    using using
    criteria 1 criteria 2
    Manager1 35 242
    I would expect to write an anonymous pl/sql block with a driving cursor determining the managers to report on. Within that cursor, I would execute a number of other queries to derive the count for each of the two columns.
    I have tried creating a report region based on a sql statement, but that requires a single sql statement. I also tried creating a report region based on plsql, but it required an into statement of defined items. This option looks like it can provide multiple rows, but since it selected 'INTO' named fields, it only creates a report with the last row of data.
    I must be missing something. Any suggestions are greatly appreciated!!!

    If you want a wizard to create the form and report for you then yes you need to have a table. One thing that you can do is define a view that contains the data you need and define an Instead Of trigger on that view so the automatic fetch and dml will work but you can have the data stored into the different objects. basically the view and the trigger work as a router/dispatcher for the data.
    *edit*
    I should also add that you can write a pl/sql package which does the fetch and the dml operations with the form items as input. This is the solution I would typically use for any form that was not a simple CRUD form for a table. One thing to note is for the fetch I prefer to use out parameters for the form items so it requires the developer to map the item to the param in the app so it will show up when you are searching through the app. I highly discourage hiding item references inside of packaged code.
    Good Luck!
    Tyson
    Message was edited by: TysonJouglet

Maybe you are looking for

  • PSE 7 confusion about folder location, help needed

    Here's some background: I'm using PhotoShop Elements 7 on Win XP.  I have an external firewire hard drive I use for overflow/backups.  Originally, this showed up as a K: drive on my system. I added a RAID controller and two more drives to stripe as a

  • How can i import my iphoto pictures on my older macbook pro 17 into my iphone

    How can i import my iphoto pictures on my older macbook pro 17 into my iphone. I can see my device icon on iphoto but no icloud capability nor can I select and  drag my pics into my device (iphone 5).

  • Visually handicap, needs to increase font size in logic pro, Command  doesn't work

    Hi,      I'm visually handicapped, and new to logic-pro.  I'm having a miserable time reading the internal logic-pro fonts.  Command + doesn't work, and I can't find any preferrence or settings options that affect the default font sizes, any ideas?

  • Lync control panel and internal web Services

    Hi, In our Lync 2013 deployment for web services we have set override  FQDN for internal Web Services asialyncpool.corp.contoso.com and External web services as web.contoso.com. The Control Panel URL has been set to https://admin.contoso.com When i l

  • E71 BUG

    I have just buy the new nokia e71 and I Have found this bug: - I can't send to two or more contacts "business card" to another nokia... (only to one contact)if I selected two or more contacts and i press send "business card" not appear - the contact