Filtering table entries based on conditions

Hi there,
I would like to filter out some of the entries of the tables based on condition, how can I do that? I"m currently working on ICWC.
Thanks,
Jared

HI Jared81,
Use <b>SELECT</b> Statement..
   SELECT SINGLE zzemp_type
   FROM pa9000
   INTO l_employee_type
   WHERE pernr = l_pernr
     AND begda LE sy-datum
     AND endda GE sy-datum.
  IF sy-subrc = 0 .
  endif.
or use
<b>READ</b> table statement
READ TABLE i_ltype INTO w_ltype WITH KEY leave_code =   g_leavetype_selected.
   IF sy-subrc = 0.
     g_leave_cat  = w_ltype-leave_cat.
     g_leave_type = w_ltype-leave_code.
  Append w_ltype to i_ltype.
   ENDIF.
Rgds,
Jothi.
*<u>reward all helpful answers.</u>

Similar Messages

  • Displaying only the relevant table data based on condition

    Is it possible to display a part of a table based on a condition which is not in that table.
    My example - I am using the spreadsheet to determine the accumulation of $$ in an account over a period of time and then how quickly that would be spent at a designated withdrawal rate.
    However, I only want to display the values that relate to the time frame I specify.
    So in one table I have Personal Data like income, savings, age, interest rate, spending etc.
    In this table I have one column as Age Today and another is Age to stop, then age to Start spending.
    My second tale has all the relevant calculations to accumulate and then withdraw and spend the money.
    What I am looking to do is create and display the relevant portions of the table which refer to the Age Today and Age to Stop.
    Is this possible?

    Hello
    At this time, there is no such a feature in Numbers.
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'09
    Yvan KOENIG (from FRANCE samedi 29 mars 2008 11:05:22)

  • Disable columns in table control based on condition

    Hello Gurus,
         I am having a table control in my module pool program.Out of 25 columns , I am having 12 columns on months wise like (jan, feb, march....).Now my concern is based on current month I want to enable the column of month rest all months will be in disable mode.So that the user can enter his/her time of work.Could you please tell me any way.I tired to read tc-cols and stored in col with index but its not working I wrote this code for first month without any condition
    READ TABLE tC-COLS INTO col INDEX 22.
       col-SCREEN-INPUT = 0.
       MODIFY tC-COLS FROM col INDEX 22.
    but its not working.I wrote this code in PBO as well as i tried in PAI as wellstill my columns is in enable mode.Also when user clicks on button then only the table control required fields should start working like months enable/disable process.for eg. I am having 2 button one is Create and other is Search on both these buttons after click the condition for enable/disable months should work.
    Thanks
    Gaurav

    Hi,
    In my scenario, I have used months as radio buttons. A month is selected and "enable" button must be clicked so that only the corresponding column of the month turns into an editable mode.
    I have attached the output.
    The field can be disabled or enabled by using the line type of <table_control_name>-cols.
    It contains the screen elements. For disabling / enabling, use active element in screen.
    This must be written in PBO event of the corresponding screen containing the table control.
    Coding:
    * Type-Pools
    TYPE-POOLS: abap.
    *   Types
    TYPES: BEGIN OF ty_month_emp,
             jan   TYPE char30,
             feb   TYPE char30,
             mar   TYPE char30,
             apr   TYPE char30,
             may   TYPE char30,
             jun   TYPE char30,
             jul   TYPE char30,
             aug   TYPE char30,
             sep   TYPE char30,
             oct   TYPE char30,
             nov   TYPE char30,
             dec   TYPE char30,
             id    TYPE char10,
             name  TYPE char10,
             age   TYPE char10,
            END OF ty_month_emp,
            ty_t_month_emp TYPE STANDARD TABLE OF ty_month_emp.
    *   Data
    DATA: gs_month_emp  TYPE ty_month_emp,
           gt_month_emp  TYPE ty_t_month_emp,
           ok_code       TYPE sy-ucomm,
           r1            TYPE char1 VALUE abap_true,
           r2            TYPE char1,
           r3            TYPE char1,
           r4            TYPE char1,
           r5            TYPE char1,
           r6            TYPE char1,
           r7            TYPE char1,
           r8            TYPE char1,
           r9            TYPE char1,
           r10           TYPE char1,
           r11           TYPE char1,
           r12           TYPE char1.
    *   Table Controls
    CONTROLS: tc TYPE TABLEVIEW USING SCREEN 9000.
    *   Field-Symbols
    FIELD-SYMBOLS: <fs_cols> LIKE LINE OF tc-cols.
    *   Initialization
    INITIALIZATION.
       CALL SCREEN 9000.
    *&      Module  ENABLE_COLUMN  OUTPUT
    *       text
    MODULE enable_column OUTPUT.
       LOOP AT tc-cols ASSIGNING <fs_cols>.
         PERFORM enable_col USING: r1 'GS_MONTH_EMP-JAN' CHANGING <fs_cols>,
                                   r2 'GS_MONTH_EMP-FEB' CHANGING <fs_cols>,
                                   r3 'GS_MONTH_EMP-MAR' CHANGING <fs_cols>,
                                   r4 'GS_MONTH_EMP-APR' CHANGING <fs_cols>,
                                   r5 'GS_MONTH_EMP-MAY' CHANGING <fs_cols>,
                                   r6 'GS_MONTH_EMP-JUN' CHANGING <fs_cols>,
                                   r7 'GS_MONTH_EMP-JUL' CHANGING <fs_cols>,
                                   r8 'GS_MONTH_EMP-AUG' CHANGING <fs_cols>,
                                   r9 'GS_MONTH_EMP-SEP' CHANGING <fs_cols>,
                                  r10 'GS_MONTH_EMP-OCT' CHANGING <fs_cols>,
                                  r11 'GS_MONTH_EMP-NOV' CHANGING <fs_cols>,
                                  r12 'GS_MONTH_EMP-DEC' CHANGING <fs_cols>.
       ENDLOOP.
    *  LOOP AT tc-cols INTO ls_cols.
    *    IF r1 = 'X'.
    *      ls_cols-screen-active = 1.
    *    else.
    *      ls_cols-screen-active = 0.
    *    ENDIF.
    *    modify tc-cols FROM ls_cols INDEX sy-tabix.
    *  ENDLOOP.
    ENDMODULE.                 " ENABLE_COLUMN  OUTPUT
    *&      Form  ENABLE_COL
    *       text
    *      -->P_0170   text
    *      -->P_0171   text
    *      <--P_<FS_COLS>  text
    FORM enable_col  USING    p_radio              TYPE c
                               value(p_screen_name) LIKE screen-name
                      CHANGING pa_cols              LIKE LINE OF tc-cols.
       IF p_radio = abap_true.
         IF pa_cols-screen-name = p_screen_name.
           pa_cols-screen-active = 1.
         ELSE.
           pa_cols-screen-active = 0.
         ENDIF.
       ENDIF.
    ENDFORM.                    " ENABLE_COL
    Thanks & Regards,
    T. Prasanna Kumar

  • Se16 table entries

    Hello all,
    I have deleted the some of the operations in the task list which was maintiained earlier and went back to Se16 and still seeing the deleted entried in the table PLPO. I guess it should not be in there. Does Se16 does not update the table entries based on the update in the transaction ?
    Mahee

    Hi,
    No they are not deleted (or marked deleted) in PLPO, the operations may be valid for a specific period of time. To see which operations are deleted check PLAS table, field LOEKZ.
    -Paul

  • Extracting from table based on conditions from two internal tables

    Hi,
         i to have select few records from  a table based on conditions from two different internal tables. How can I achieve this.?
    ex:
          select objid from HRVPAD25 into table t_pad25
                                                    where PLVAR = 01
                                                                OTYPE = E
                                                                OBJID = itab1-sobid
                                                                sobid = itab2-pernr.
    How can this be written? can i use "for all entries..." addition with 2 tables?

    Hi Maansi_SAP,
    you can use exactly one internal table in the FOR ALL ENTRIES clause. Consider this alternative:
    data:
      itab_sobid_hash like itab1 with unique key sobid,
      ls_pad25  like line of  t_pad25.
    sort itab1.
    delete adjacend duplicates from itab1 comparing sobid.
    itab_sobid_hash = itab1.
    select objid
      into ls_pad25
      from HRVPAD25
      for all entries in itab2
      where PLVAR = '01'
        and OTYPE = E
        and sobid = itab2-pernr..
    read table itab_sobid_hash with table key sobid = ls_pad25-objid.
    check sy-subrc = 0.
    append ls_pad25 to t_pad25.
    endselect.
    You may decide if itab1 or itab2 is better used as hashed table. Make a performance test.
    The critics will tell you that SELECT ... ENDSELECT is not performant. That was very true, back in last milleniums's 90ies
    Regards,
    Clemens

  • How to create internal table dynamically based on a table entry

    hi Experts,
      I have table yprod_cat. It has product categories.
      In my ABAP program I need to create internal table dynamically based on the number of entries in the table.
      For example:
      If the table has 3 entries for product category
      1. Board
      2. Micro
      3. Syst
    Then create three (3) internal tables.
    i_board
    i_micro
    i_syst
    How can we do this? Any sample code will be very usefull
    Thanks & Regards
    Gopal
    Moderator Message: No sample codes can be given. Please search for them or work it!
    Edited by: kishan P on Jan 19, 2011 4:22 PM

    Our APEX version is 4.2We are using below SQL query to display radio groups dynamically..
    SELECT APEX_ITEM.RADIOGROUP (1,deptno,'20',dname) dt
    FROM dept
    ORDER BY 1;
    Created a form using SQL type and given abouve SQL query as source.. But when we run the page, there were no radio groups displayed in the page..
    Below is the output of the query..
    <input type="radio" name="f01" value="10" />ACCOUNTING
    <input type="radio" name="f01" value="20" checked="checked" />RESEARCH
    <input type="radio" name="f01" value="30" />SALES
    <input type="radio" name="f01" value="40" />OPERATIONS
    >
    If Tabular Form:
    Edit Region > Report Attributes > Edit Column > Change the Column type to "Standard Report Column"
    If normal Page Item:
    Edit Page Item > Security > Escape special characters=No.
    Pl read the help on that page item to understand the security risk associated with =NO.
    Cheers,
    Edited by: Prabodh on Dec 3, 2012 5:59 PM

  • How to find the Conditions and Condition values in table entries

    Dear Experts -
    the issue is about getting the table entries of Pricing procedure Condition type and condition values - Application Component - MS external service management.
    In case of service order Condition document number (EKKO - KNUMV) is not updated.
    KNUMV we can use for Pricing procedure - Application componant - M Purchasing.
    How to get table entries of pricing procedure - Application Componant - MS External services management.
    Thanks in Advance

    Hi
    SES releated table:
    ESKL - Account assignment specification for service line
    ESKN - Account assignment in service package
    ESLH - Service package header data
    ESLL - Lines in service package
    ESSR - Service entry sheet header data
    ESUC - External services management: Unplanned limits for contract item
    ESUH - External services management: unplanned service limits header data
    ESUP - External services management: unplanned limits for service packages
    ESUS - External services management: Unplanned limits for service types
    Regards
    Prasanna R

  • Hide column based on condition on other column in table

    hi,
    am using BIP 10.1.3.2 to generate reports.In the template i need to hide one column based on condition on other.am using SQL query as my data source type.can anybody help me ?

    Use <?if:?> condition in the RTF, but its mainly for the rows not column. You can work around this by handeling in backend. Or take two separate tables, one with the column which you want to hide and another table without that column and before calling that table use IF condition.
    Regards,
    Amit D
    Persistent Systems Ltd.

  • Table Control - Input Enabling/Diabling of Rows based on Condition.

    Hi,
    In the TC, I want to Input Enable/Disable the rows based on Conditions. The First row is input enabled always. But the other rows, (2nd onwards) need to be Input Enabled/Disabled based on some conditions. It is possible to make this working. Can you please provide me a suitable solution for this?
    Appreciate Your Help.
    Thanks,
    Kannan

    Hi Kannan...
    If we are talking about "Rows"...
    then identify based on some conditions the row numbers and in PBO...loop at screen with screen name..set thier input properties and modify screen (make them input only)
    If we are taking into consideration "columns"
    There is an internal structure COLS where we can identify column number of screen name ...or we can take except for one particular column..
    if some condition satisfied....
    loop at screen where screen-name <> "Column which is input'.
    Loop at screen...and make other columns display only.
    modify screen
    endif.
    Regards
    Byju

  • Volume Based Rebate condition entries in MIGO

    Hi ,
    I configured the Volume Based Rebate condition.
    I made condition as copying A001 (Std.) . Conditon class: Expense reimbursement, Cal. Type: Qty. and Accrual.
    Assign 26 requirement, Accounting key & accrual key as B02 & B01. Assign GL accounts in OBYC.
    When I am doing MIGO
    Inventory  Dr  say 1200-
    Rebate    Dr           100-
    GR/IR      Cr          1300
    In this case at this point it should hit Inventory account or not. I don't want to hit Inventory. Actually I may or may not take this rebate or may not take full rebate.
    How to do this.
    Regards

    Hello,
    It will hit inventory A/c,  if you don't want it you should create a new account using Rev A/c Det and assign it.

  • Marking Z table entry for Deletion

    Hi All,
    Based on some condition in my program,
    I am entrying one entry in Custom Z table.
    Also for some other condition,
    I need to mark the Table entry for deletion only, but it should not Delete.
    So pls guide me for:
    1) How to make Custom table entry as Mark for Deletion?
    2) When I put Select Query on table, how  can I write that do not Select those
        Records which are marked for  Deletion ?
    Rishi

    Hi Rishi,
    Create a new field of type 'CDXFELD' (Data Type) in the Custom Z table. Now populate that new field with 'X' if it is marked for deletion. Then you can select all those entries which that field 'CDXFELD' = Space.
    i.e., if the field 'CDXFELD' = 'X' then it is marked for deletion else not.
    Select *
      from Zcustom talbe
      in to IT_TAB
      where  CDXFELD = space.
    Hope this will help..
    Regards,
    Ravi..

  • Table entry J_1IPART2.

    Dear All,
    I am planning to make table entry for table J_1IPART2 for amount of BED,ECS,SECS & Db/Cr Indicator.
    Please suggest the related tables that will affect due to this.
    Also the related precautions that to be take care off.
    Thanks
    Akshay

    Can you clarify that why do you make direct table entry in J_1IPART2?. 
    If already Part I entry is there, then you can ahead through J1IEX -> Post -> Vendor - Interal Excise Invoice Number ->
    Give Part I Number as input.
    The following are the table related Excise
    J_1IPART1                      Excise part I detials            
    J_1IPART2                      Excise Part II details           
    J_1IQEXCISE                  Quantity based AED, NCCD and SED 
    J_1IREGSET                   Excise Registrations             
    J_1IRG1                          Excise RG1 details               
    J_1ISRGRPS                   Excise Document Series           
    J_1ITAXIND                      Excise Tax Indicator             
    J_1IEXCACC                    Excise Account Assignment table           
    J_1IEXCDEF                    Tax default informations                  
    J_1IEXCDEFN                  Default Condition Types                   
    J_1IEXCDEP                    Excise information of vendor at detail lev
    J_1IEXCDTL                     Excise invoice line item details          
    J_1IEXCHDR                    Excise invoice header detail              
    J_1IEXCREF                    Delivery document to excise invoice refren
    J_1IEXCTAX                    Tax calc. - Excise tax rates   
    Before update, please check the fields and their respective fields and then update.
    Hope it might be useful to you.
    Thanks.
    Ravi

  • Html error while downloading table entries to Excel.

    Hi,
    I am getting an error while downloading table entries from webdynpro to excel. After some entries below error script comes and  this is not comming all the times.
    Is this because of large size?Can anyone please suggest me on this?
    <u>Here is the dump:</u>
    [code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>                                   
    <head>                                   
         <title>Error Report</title>                              
    <style>                                   
    td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;}                                   
    A:link                                    
    A:visited                                    
    A:active                                    
    </style>                                   
    </head>                                   
    <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0">                                   
    <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75">                                   
    <tr bgcolor="#FFFFFF">     
        <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>  500   Internal Server Error</b></font></td>     
    </tr>     
    <tr bgcolor="#3F73A3">     
        <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td>     
        <td height="23"><img width=1 height=1 border=0 alt=""></td>     
        <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP J2EE Engine/6.40 </b></font></td>     
    </tr>     
    <tr bgcolor="#9DCDFD">     
        <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td>     
    </tr>     
    </table>     
    <br><br><br><br><br><br>     
    <p><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>  Application error occurs during processing the request.</b></font></p>     
    <p><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><table><tr><td valign="top"><b> Details:</b></td><td valign="top"><PRE><pre>com.sap.engine.services.servlets_jsp.server.exceptions.WebIllegalStateException: The stream has already been committed.     
         at com.sap.engine.services.servlets_jsp.server.runtime.client.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:792)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:780)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:768)
         at com.sap.tc.webdynpro.serverimpl.core.url.WebDynproExchangeHandler.responseCachedWebResource(WebDynproExchangeHandler.java:98)
         at com.sap.tc.webdynpro.serverimpl.core.url.WebDynproExchangeHandler.doExchange(WebDynproExchangeHandler.java:189)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doExchangeProcessing(DispatcherServlet.java:164)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:119)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    </pre></PRE></font></td></tr></table></font></p>     
    </body>     
    </html>[/code]
    Thanks,
    Sanjeev

    Hallo Sanjeev,
    How do you exactly "download the table entries from Web Dynpro to Excel?"
    I wrote a new <b>Wiki Code Tutorial </b>which demonstrates how to download an Excel file from a Web Dynpro <i>Table </i>UI element <b>on-demand</b>. In this scenario the resource gets re-created on every request. The solution is based on re-initializing the context with a new  0-byte resource object within the calculated context attribute getter method.
    See <a href="https://wiki.sdn.sap.com/wiki/display/Snippets/ExportingTableDatainWebDynproJava-SAPNetWeaver04s">Exporting Table Data in Web Dynpro Java - SAP NetWeaver 04s</a>
    Regards, Bertram

  • Creation of internal table dynamically based on the Date Range entered

    Hi SAPgurus,
    I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
    Right now my program is displaying the ALV like this.
    Ex:
    <b>CSR    District   06/2006  07/2006  08/2006  totals</b>      
    Shiva      New York                             10.00
    Shiva      new york                             30.00
    Shiva      new york                             40.00
    but it should display like this
    <b>CSR    District 06/2006 07/2006 08/2006 totals</b>
    Shiva  New York  10.00   30.00 40.00
    80.00                 
    Please help me in this scenario, how to acheive like this..
    Thanks & Regards,
    Sivaram Kandula

    Hi Sivaram,
                 I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
    Sivaram, can you please explain your code after this.
    *<dyn_table>
    *tab_item.
      LOOP AT tab_item.
        ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
        ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
    *    <dyn_wa> = tab_item-bztxt.
    *    <dyn_wa> = tab_item-total.
    *    APPEND <dyn_wa> TO <dyn_table>.
    **    <dyn_wa> = tab_item-total.
    **    ASSIGN tab_item-bezei  TO <dyn_wa>.
    *  APPEND <dyn_table>.
      ENDLOOP.
    how you are puting the loop at tab_item. but tab_item is already commented.
    can you send me the code after that.
    i am sending some part of my code.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
       EXPORTING
         it_fieldcatalog = gt_fCAT1
       IMPORTING
         ep_table        = new_table.
    ASSIGN new_table->* TO <dyn_table>.
       create data new_line like line of <dyn_table>.
       assign new_line->* to <dyn_wa>.
    select vbeln
            fkart
            vkorg
            vtweg
            fkdat
            spart
            fksto
            from vbrk
            client specified
            into table gt_vbrk
            where mandt = sy-mandt
            and fkart in ('ZF5','ZFR')
            and vkorg = '1100'
            and vtweg = '20'
            and fkdat in s_fkdat
            and spart = '06'
            and fksto = ' '.
       if gt_vbrk[] is not initial.
      select  vbeln
              fkimg
              prsdt
              netwr
              matnr
              arktx
              werks
              mwsbp
              from vbrp
              client specified
              into table gt_vbrp
              for all entries in gt_vbrk
              where vbeln = gt_vbrk-vbeln
              and werks in s_werks
              and matnr in s_matnr.
      endif.
    select mnr ltx spras from t247
    into table it_t247
    where spras = 'E'.
    data: lv_month1 type vbrp-prsdt,
           name1(3) type c,
           s_month type string,
            s_month1 type string,
             s_month2 type string.
    *      lv_netwr1 type vbrp-netwr,
    *          lv_mwsbp1 type vbrp-mwsbp.
          loop at gt_vbrp into gs_vbrp.
            gs_final2-matnr = gs_vbrp-matnr.
            gs_final2-arktx = gs_vbrp-arktx.
            gs_final2-fkimg = gs_vbrp-fkimg.
           lv_month1 = gs_vbrp-prsdt.
            read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
            if sy-subrc eq 0.
            name1 =  wa_t247-ltx.
            endif.
             concatenate  name1
                       lv_month1(4) into s_month SEPARATED BY '_' .
             CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
              CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
             gs_final2-month = s_month.
              lv_netwr1 = gs_vbrp-netwr.
            lv_mwsbp1 = gs_vbrp-mwsbp.
            gs_final2-MONTH_QTY = S_MONTH1.
            GS_FINAL2-MONTH_VAL = S_MONTH2.
            gs_final2-value = lv_netwr1 + lv_mwsbp1.
           append gs_final2 to gt_final2.
           clear: gs_final2. "lv_name2.
           endloop.
           if gt_final2[] is not initial.
             sort gt_final2 by matnr month ascending .
             loop at gt_final2 into gs_final2.
            gs_final2_01 = gs_final2.
         collect gs_final2_01 into gt_final2_01.
        endloop.
           endif.
       ENDIF..
    Regards
    Ankur

  • Calling different pages in a single sap script based on conditions?

    Hi All,
             Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes.
    Please help
    Regards
    Priya

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

Maybe you are looking for

  • Error message "ipod is currently synced to a different library"

    My hard drived crashed and I purchased a new computer.  When I installed ITunes on my new machine and tried to sync my music I receive the following error message "your Ipod is currently synced to a different itunes library erase and sync or cancel" 

  • Reference Document Functionality - Complaints

    Hi I am working in CRM 4.0 We want the reference document functionality in PCUI when creating complaints. When we create complaints directly it gives a warning in PCUI "You have not specified a Reference document" Is there any standard way to go abou

  • Problem connecting laptop to wireless network

    Greetings.  I recently installed ArchLinux on my asus N80Vb laptop.  I downloaded the .iso for the core installation and burn a CD which I used to install.  Checksums were a match.  I followed instructions on the installation guide and everything see

  • Cannot open .jnlp file when asked to open with firefox web browser in ubuntu 11.10 using firefox 6

    After upgrading to ubuntu 11.10 the firefox 6 browser cannot download and open .jnlp file from the interactivebrokers website. Usually I go to the IB website and download tws.jnlp file which is opened in the firefox web browser. But now when I click

  • Availability check on rejecting shopping cart in UWL

    Dear all, We are using SRM 7.0 and the portal in an approval workflow for shopping carts. On ECC side we create reservations for stock - materials. Now we have the problem that in the UWL a availability check is started when the user approves or reje