Colouring Rows of a Table depending on a particular condition.

Hi,
    The problem I am facing is coloring specific rows of a table depending on the satisfaction of a particular condtion. For example: All rows having the value in the amount column greater than 1000 have to be coloured in red and the remaining yellow.
     Can anyone please help me out with this row-coloring problem?
Regards,
Gaurav.

Hi Martin,
Have used an image column to display image.
You can define the condition in the URL field, to display the image. Something like:
=IF(@img=="50",store@IMAGE_URL&"Green_dot.png",IF(@img=="40",store@IMAGE_URL&"Yellow_dot.png",IF(@img=="39",store@IMAGE_URL&"Red_dot.png","")))
Where store@IMAGE_URL has the URL to the location where the images are stored.
Let me if it helps.
Regards,
Dharmi

Similar Messages

  • How to get more than 4 coloured rows in a report depending on column values

    Hi,
    I've looked through the forum and found some stuff on mutli-coloured reports and found the link to http://htmldb.oracle.com/pls/otn/f?p=11933:7:557008579481721819
    But I have several problems:
    This shows how to get 3 colours, but it's easy to get up to 4 by just using the "Column Templates" in a new report template.
    I don't understand where to put the snippets. It says to put them in "Row Templates" , "Before Rows" and "After Rows" but my report template page doesn't have these options! I've got "Column Templates" (4 of them), "Before Each Row" and "After Each Row".
    Am I looking at a link for an old version?
    What I want to do is set the row colour dependant on a column called "level" which is between 1 and 5.
    Thanks

    Hi Vikas,
    It's almost perfect now. My only problem is that the pagination table is, for some reason, enclosed within the results table (I've used FireFox web developer's tools and checked the souce HTML to be sure of this). So, if I have a border at table level, it appears on the row containing the pagination.
    I've had to remove table borders and put right borders on the table data cells, but I can't find a way to put left borders on the table rows, so I have a pretty table with 5 levels of colour, but no borders on the left-hand side.
    Ideally I'd like to avoid having the pagination stuff within the results table, but I can't see how/where to put a </table> to sort this out!
    Ros

  • Hide a Row in Pivot table depending on condition

    Hi , I am using pivot table which is in below format.
    I--------------------date 1 | date 2 | date 3| new calculated item
    measure 1 v1 v2 v3 v4
    measure 2 v5 v6 v7 v8
    measure 3 v9 v10 v11 v12
    measure 4 v13 v14 v15 v16
    now i need to hide the date 2 (ie v2 v6,v10,v14) column in the pivot table ( which is actually a value in a row for a column named as_of_date)
    is this possible.
    please let me know the solution.

    Thanks @mma
    i am unable to pass that {val1} exactly
    here my scenario is, i have
    year prompt and quarter prompt
    depending on year prompt ,quarter prompt is populated with 4 dates
    now i need to pass the max and min values of dates
    to the asofdate.
    please explain me this scenario.
    thanks

  • Adding images to rows in a table depending on file type

    Hello,
    Within Visual Composer we have a table which lists documents and contains information about the document type
    i.e. description = 'This is a Word Document', file type = 'application/msword'
    then I have uploaded the images (icons) for the different file types, created a 'Document Type' column (of type image) in the table and assigned the correct boolean statements to determine which icons are shown
    e.g. BOOL(IF(@MIMETYPE == 'application/msword', true, false))
    This is the exact steps explained in the how to: How To… Integrate BI Document Store and SAP Analytics Applications
    But just does not work? It will not display the icons even though the file type (MIMETYPE) is displayed and is correct.
    Any help much appreciated!

    Seem to have fixed the problem.
    By adding a filter before the table view it seems to allow a slight delay which allows the file types to load and the IF statements run correctly and display the correct images for the various file types.
    Still seems that there is a slight Visual Composer Issue there? (but now with a work-around)

  • Smartform Dynamic colour in the item table

    Hi Experts,
    I have a requirement wherein we need different colours for each item in the table according to a particular condition.
    If the value in the  column two is 1 ,first item should have a colour blue in the last column
    If the col2 is 2, second item should have red colour in the last column.
    and accordingly.
                          Col 1       Col2       Col3      Col4
    Row1                                1                   Blue colour
    Row2                                2                   Red colour
    Row3                                3                   Green colour
    Is this possible in smartforms.
    Already tried giving condition in the condition tab and choosing the colour for different text elements,which is not possible.
    Tried writing the below code in initialisation which is also not helping.
    * Color
    *DATA: l_tabdef  TYPE ssftabdef,     " Work Area for the Table
    *     t_ltypes  TYPE tsfltype,      " Table - Line types
    *     l_ltypes  TYPE ssfltype,      " Work Area for the table
    *     t_colinfo TYPE tsfcolinfo,    " Table - Columns
    *     l_colinfo TYPE ssfcolinfo,    " Work area for the table
    *     t_border  TYPE tsfctaba,      " Tables - Borders
    *     l_border  TYPE ssfctaba.      " Work Area for the borde
    * FIELD-SYMBOLS : <f_tab> type tsftabdef.
    *ASSIGN ('(SAPLSTXBC)TABDEFS') TO <f_tab>.
    *bREAK-POINT .
    *LOOP AT <f_tab> INTO l_tabdef  where name = 'ITEM_VALUES'.  "  only for one template
    ** Table line Types
    **  Line type TYPE1 from the table MAIN_TABLE
    *  LOOP AT l_tabdef-tltype INTO l_ltypes where linetype = 'L2'.  " only for one line type is required
    ** Coloum information
    **   Column1 (cell) of the TYPE1
    *    LOOP AT l_ltypes-tcolinfo INTO l_colinfo." where widthv = '1.31'. .
    ** Borders
    **   Background color and borders for that cell
    *      LOOP AT l_colinfo-borders INTO l_border.
    ** Clearing the color parameters for the cell
    *        CLEAR: l_border-intensity,              " Intensity
    *        l_border-fillcolor-red,          " Red
    *        l_border-fillcolor-used,         " Color Used
    *        l_border-cfillcolor-color,       " Red color in Hexa
    *        l_border-cfillcolor-xred.        " Color used in Hexa
    *        l_border-fillcolor-red = '255'.
    *        l_border-fillcolor-green = '000'.
    *        l_border-fillcolor-blue = '000'.
    *        l_border-fillcolor-used = 'X'.
    *        l_border-cfillcolor-color  = 'X'.
    *        l_border-cfillcolor-xred = 'FF'.
    *        l_border-cfillcolor-xgreen = '00'.
    *        l_border-cfillcolor-xblue = '00'.
    *        MODIFY l_colinfo-borders FROM l_border.
    *      ENDLOOP.
    *      MODIFY l_ltypes-tcolinfo FROM l_colinfo.
    *    ENDLOOP.
    *    MODIFY l_tabdef-tltype FROM l_ltypes.
    *  ENDLOOP.
    *  MODIFY <f_tab> FROM l_tabdef.
    *ENDLOOP.
    Please suggest and help on how to proceed.
    Thanks in advance.
    Jojy

    Can you try creating 3 identical line types in Smartform with just 3 different colors. Add a field to the internal table to specify the color. Add a condition to the line types to output based on the color field.
    Thanks,
    Juwin

  • Not able to create rows in a table with dependent columns in an OAF page.

    We have a table in an OAF page which has the property "Records Displayed" set as "10". Hence pagination kicks in for more than 10 rows in the table. "Add rows" is enabled in this table. The table also has 'detail' component.
    In this table, we have created 2 new columns (dropdowns) using personalization. Dropdown 2 is dependent on the value selected in Dropdown1. Both are required fields.
    We are able to add new rows to the table. All the columns render properly. Dropdown 2 also renders properly depending on the values selected in Dropdown1. There is no issue until we add the 10th row (remember the number of displayed records in the tabble is 10). When we add the 10th row, the fields appear properly. Dropdown1 values are displayed as expected. But when we select a value in Dropdown1, Dropdown2 does not refresh and get populated with the expected values (depending on Dropdown1 values). Dropdown2 remains blank. But this happens only when the 10th row is added. Since Dropdown2 is a required field and since Dropdown2 is not refreshed with values depending on Dropdown1, the records cannot be saved.
    There seems to be a problem with refresh when the nth row is added to the table where 'n' is the Records displayed in the table (pagination).
    If we change the Records Displayed to say 15 then we have the above problem when adding the 15th row. 14 rows can added to the table without an issue.
    Can a workaround (other than increasing the number of displayed records) be provided for this issue?

    Hi,
    I suspect you have written a method having String return type but the method does not have return statement.
    Go to the Catalogue component->BPM Object->Right click on the BPM object and select New Method->Give the method name. Now the method window will be opened. Go to the propertied tab of the right most panel. Set the return type as string. In the method window editor write your business logic. The below mentioned code is for sample one.
    String msg = "Hello World";
    return msg;
    Bibhu

  • Deleting a row from parent table

    Dear Guru's
    I am having two table with parent - child relationship. My problem is when I am deleting a row from parent table the curresponding child row from child table also should be deleted.
    My Primary table 'Employee, EMPID Primary key
    Child table 'Privilage' inthis EMPID referencing the EMPID of Employee table
    My need is when I am deleting a row from parent table the curresponding child row from child table also should be deleted
    I issued the SQL query like,
    delete from employee where empid='12345' cascade constraints;
    Then it showing me error like,
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    Please resolve my issue , Its Top urgent
    Thanks & Cheers
    Antony

    Choosing How Foreign Keys Enforce Referential Integrity
    Oracle Database allows different types of referential integrity actions to be enforced, as specified with the definition of a FOREIGN KEY constraint:
    Prevent Delete or Update of Parent Key The default setting prevents the deletion or update of a parent key if there is a row in the child table that references the key. For example:
    CREATE TABLE Emp_tab ( 
    FOREIGN KEY (Deptno) REFERENCES Dept_tab);Delete Child Rows When Parent Key Deleted The ON DELETE CASCADE action allows parent key data that is referenced from the child table to be deleted, but not updated. When data in the parent key is deleted, all rows in the child table that depend on the deleted parent key values are also deleted. To specify this referential action, include the ON DELETE CASCADE option in the definition of the FOREIGN KEY constraint. For example:
    CREATE TABLE Emp_tab (
        FOREIGN KEY (Deptno) REFERENCES Dept_tab 
            ON DELETE CASCADE); Set Foreign Keys to Null When Parent Key Deleted The ON DELETE SET NULL action allows data that references the parent key to be deleted, but not updated. When referenced data in the parent key is deleted, all rows in the child table that depend on those parent key values have their foreign keys set to null. To specify this referential action, include the ON DELETE SET NULL option in the definition of the FOREIGN KEY constraint. For example:
    CREATE TABLE Emp_tab (
        FOREIGN KEY (Deptno) REFERENCES Dept_tab 
            ON DELETE SET NULL);
    SQL> conn scott/tiger
    Connected.
    SQL> create table ppk ( no number primary key);
    Table created.
    SQL> begin for inn in 1..10 loop insert into ppk values (inn); end loop; end;
    PL/SQL procedure successfully completed.
    SQL> create table ffk ( no number references ppk(no));
    Table created.
    SQL> begin for inn in 1..10 loop insert into ffk values (inn); end loop; end;
    PL/SQL procedure successfully completed.
    SQL> drop table ppk cascade constraints;
    Table dropped.Message was edited by:
    user52
    Message was edited by:
    user52
    Message was edited by:
    user52

  • Need help in hiding particular column of a table depending upon value

    Hi experts,
    I have developed a custom smartform and Print program.
    My problem is ..depending upon the data i recieve,...i have to hide a particular column.
    For example ... i have a table with 2 rows...one header and main row..This table has 3 column.
    I have to hide one of the column depending upon the data i recieve. So my output should have 2 rows and 2 columns.
    Please help.

    well vishwa u r right it wont work for multiple columns,
    then i guess this shud work.
    @thendral
    U can try like this create the rows with single column
    then print all ur text elements with spaces inserted manually between them with text editor then in conditions tab of the text elements specify ur condition according to what all u want to print.
    кu03B1ятu03B9к

  • How to set focus on a input field in a selected row of a table?

    In a previous discussion (http://scn.sap.com/thread/3564789) I asked how to access an input (sap.m.Input) field of a selected row in a table. In the answer that was supplied I was shown how to get the items of the table. Then using the selected index to get the selected item get the cells. Then I could set editable on the proper cell(s). This worked fine.
    Now I need to set the focus on one of the fields. I tried something like this:
                var oNewLink = table.getSelectedItem();
                var oNewLinkName = oNewLink.getCells()[1];
                oNewLinkName.focus();
    But this doesn't seem to work.
    I have searched through other discussions and have seen this technique for putting focus on a field if you have its ID:
    sap.ui.getCore().byId(id_of_the_input_field).$().focus();
    In my case though I do not have an ID since the row and its cells are generated. How can I set focus on the cell of a certain row in a table?

    Hello Venkatesh. Yes that code does work. First I tried it on a table cell that was already rendered and it did work. The next time I tried it on a table row that was being added and it did not work there. So I added an on after rendering function for the table and added that code there. That did not work until I added a delay (timeout) to do a context switch before calling the focus and that worked.
    Once last thing though sometimes when I call focus on an input field (actually in a table row cell) if the field has text in it already the flashing cursor is at the beginning of the text and other times it is at the end of the text (which is the desired way). It depends on where I click in the row. Is there anyway to make sure the flashing cursor is at the end of the text when the focus is applied to a field that contains text?

  • Dynamic Select of Row in a table in webdynpro Abap

    Hi,
      I have an requirement, I have an table  and a button, I need to select a row in a table based on button action.
    For example : in a table i have 3 rows. I am submiting a value in a button, I want to see that row highlighted for the value I am sending through button.
    Please let us know the code how to implement this.
    Thanks

    Hi,
    First you have to go to table and set its property "SELECTION MODE" to single or multi lead depending on ur need.
    Then in the ACTION of the button you can use the following code to get the values in the selected row.
    DATA:
         node to get table node for finding no. of rows
            lo_nd_one  TYPE REF TO if_wd_context_node,
         Get selected row for finding no. of rows
       it_table               TYPE        wdr_context_element_set,
         workarea to get selected row
            wa_table                LIKE LINE OF           it_table,
    To get the Selected line item into an internal table
      CALL METHOD lo_nd_one->get_selected_elements
        RECEIVING
          set = it_table.    " data in internal format
      IF it_table[] IS NOT INITIAL.
      type conversion for work area
        READ TABLE it_table INTO wa_table INDEX 1.
    if a row is present
        IF  sy-subrc IS INITIAL.
        Get the values of each attribute
          CALL METHOD wa_table->get_static_attributes
            IMPORTING
              static_attributes = wa_final.       "<Selected data in work area.>  ---> this will have your data
        ENDIF.
    Here wa_final is the work area which is of your table fields type.
    This wa_final will have the selected row.

  • Need to send text string to new row in expandable table

    I have a table that is a summary of other choices made throughout the document.  For specific check boxes in the form, there is a defined phrase that needs to be sent to a new row in the summary table.
    The general idea is that for checkbox:
    form1.sfMain.sfContent.tableC2.Row1.cbC2b6
    if (this.rawValue == "1") {
    this.resolveNode('form1.sfApp6.tableApp6A._Row1').addInstance(1);
    this.resolveNode("form1.sfApp6.tableApp6A.Row1[*].ddApp6A1c").rawValue = "Blue bottle";
    This needs to be something I can specify for each applicable checkbox (each will have a different text string), but I don't know what the final count is going to be (depends on choices made by the user) so I can't delete rows in the table and start over every time.  It needs to be additive.
    Any suggestions?
    Message was edited by: cyndilynnrose

    For anyone needing the same thing, I found exactly what I needed:
    http://www.truetechtroubleshooting.com/2012/02/advanced-expanding-tables-and-script.html
    The hardest part of getting it working was figuring out how many parent levels I needed to add since I have a heavily layered form.

  • Editing a particular row in a table - Web Dynpro Abap

    Hi all,
    My scenario is, I have to fetch contract details from EKPO table when I enter the Purchase Document Number and press SUBMIT button on my interactive form. The details will be displayed in a table.
        This part is working fine.
    Then, out of the displayed rows in that table, I have to click one of the rows. This particular row should appear as a separate row below the existing table. Here I will edit certain fields and update the database.
    My question is, How to display that particular row below the existing table which I select. The table will dynamically increase the row size depending on the records.

    Hi Surya,
    You can use the index property to display the selected row data.
    Suppose your form structure is like:
    BodyPage
       TBL_EKPO
           DATA
               EBELN
               EBELP
               LOEKZ
        SF_SELECTED_ROW_DISPLAY
            EBELN
            EBELP
            LOEKZ
    Then, in any of the field's exit event you can write:
    BodyPage.SF_SELECTED_ROW_DISPLAY. EBELN.rawValue = xfa.resolveNode( " BodyPage.TBL_EKPO.DATA["+ this.parent.index +"].EBELN").rawValue;
    Hope this helps.
    Amit

  • Query from oracle to MySql using dblink fetch all the rows in MySql table

    Hello,
    I am using Heterogeneous connectivity between oracle 10204 to Mysql database.
    I have a database link in the oracle side .
    I am query a table in MySql that have 10 million rows.
    Its doesnt matter if i am running :
    select * from "CDR_Accounts"@mysql where "id"=7675405;
    or
    select * from "CDR_Accounts"@mysql ;
    There is an index on the id column.
    Yet, it seems that the Mysql is feteching all the rows from the table , all the data is transfering to oracle over the dblink , and only after that the requested rows are get back to the client.
    The /etc/odbcinst.ini file is as follow:
    [odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini
    [myodbc3]
    Description             = Mysql connector to mysql version 3.5
    Driver          = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so
    Driver64                = /usr/lib
    Setup           = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so
    Setup64         = /usr/lib
    UsageCount              = 1
    CPTimeout               = 3600
    CPReuse         = Please advice
    Thanks

    When using a gateway it is always possible that a where clause is not sent to the remote database. This is called post processing and depends on several factors like the used ODBC driver, the columns and its data types but also if you specify certain functions in the where clause.
    The fastest way to see if post processing happens is in Oracle 11g the explain plan for a query. In 10g the plan does not always match the statement sent to the foreign database. Here it would be better to enable gateway tracing and setting the trace level to ON. This will log the statements sent to the foreign database and you can compare what statement was sent with the statement you've tried to execute.

  • Changing number of rows oin a table control dynamically

    Hi all
    Is there a way to change the no of rows dynamically.
    I have a requirement that at run time , depending on a condition, I have to change the no of rows in the table control to 1 row.
    Is this possible to do?If else How?
    Thanks.

    You can redefine table control attributes eachtime PBO is called, because those attributes are dynamic. So although you defined tc-lines as 1 in first PBO execution, you can redefine to 2 if some condition is achieved,
    One idea could be to create a global var, called tc_lines which is initialized as 1. In your PBO you shoud use: <tc>-lines = tc_lines.
    In PAI, when you obtain your condition, you shoud here add or subract one from this global variable.
    Regards,
    Valter Oliveira.

  • How to display particular ROW of a table control in display/change mode

    Hi,
    Can we make particular ROW in a table control display mode or editable mode depending upon the conditions?.
    Any inputs..
    Rgds,
    Lakshmiraj

    Hi,
    Yes it is possible. check the follwoing code for help.
    *&  Include           Z101954_ASSIGNMENT1I01
    *&      Module  VALIDATE_SALES_ORG  INPUT
          text
    MODULE validate_sales_org INPUT.
    SELECT SINGLE zvkorg FROM vbak INTO zvbak-zvkorg
    *WHERE zvbeln = zbookhdr-zvbeln.
    IF sy-subrc <> 0.
       MESSAGE 'INVALID AIRLINE ID INPUT' TYPE 'I'.
       CALL SCREEN 1000.
    ENDIF.
    ENDMODULE.                 " VALIDATE_SALES_ORG  INPUT
    *&      Module  USER_COMMAND_1001  INPUT
          text
    MODULE user_command_1001 INPUT.
      var3 = 1.
      IF sy-ucomm <> 'SAVE'.
        PERFORM material_check.
        IF sy-subrc <> 0.
          MESSAGE 'ENTER THE CORRECT MATERIAL NUMBER' TYPE 'I'.
        ELSE.
          SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara
            INTO CORRESPONDING FIELDS OF it_salesitems
             WHERE zmatnr = it_salesitems-zmatnr.
          SELECT SINGLE zwerks zlgort FROM zorg
            INTO CORRESPONDING FIELDS OF it_salesitems
            WHERE zvkorg = wa_salesorder-zvkorg
             AND zvtweg = wa_salesorder-zvtweg
             AND zspart = wa_salesorder-zspart.
          it_salesitems-znetwr = it_salesitems-zstprs * it_salesitems-zbrgew.
         MODIFY it_salesitems FROM it_salesitems  INDEX sy-tabix.
          MOVE-CORRESPONDING it_salesitems TO temp_salesitems.
          APPEND temp_salesitems.
          REFRESH it_salesitems.
        ENDIF.
      ENDIF.
    LOOP AT temp_salesitems.
      if it_salesitems-pick = 'X'.
               LOOP AT SCREEN.
             IF screen-name EQ 'DETAIL'.
               screen-input = 1.
               MODIFY SCREEN.
             ENDIF.
           ENDLOOP.
           endif.
           endloop.
      CASE sy-ucomm.
        WHEN 'SAVE'.
          PERFORM check_ship_to_party.
          IF sy-subrc <> 0.
            MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
          ELSE.
            PERFORM check_payer.
            IF sy-subrc <> 0.
              MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
            ELSE.
              PERFORM check_bill_to_party.
              IF sy-subrc <> 0.
                MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
              ELSE.
                wa_salesorder-zernam = sy-uname.
                MOVE-CORRESPONDING wa_salesorder TO zvbak.
                MODIFY zvbak.
                LOOP AT it_salesitems.
                  it_salesitems-zvbeln = wa_salesorder-zvbeln.
                  MOVE-CORRESPONDING it_salesitems TO zvbap.
                  MODIFY zvbap.
                ENDLOOP.
                IF sy-subrc = 0.
                  MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
                  CLEAR wa_salesorder.
                  REFRESH it_salesitems.
                  REFRESH temp_salesitems.
                  IF sy-tcode = 'ZVA01'.
                    CALL SCREEN '1000'.
                  ELSE.
                    CALL SCREEN '1003'.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        WHEN 'DETAIL'.
          CALL SCREEN '1002'.
        WHEN 'BACK'.
          IF sy-tcode = 'ZVA03'.
            CLEAR wa_salesorder.
            CALL SCREEN '1003'.
          ELSE.
            PERFORM pop_up.
          ENDIF.
        WHEN 'EXIT'.
          IF sy-tcode = 'ZVA03'.
            LEAVE PROGRAM.
          ELSE.
            PERFORM pop_up.
          ENDIF.
        WHEN 'CANCEL'.
          IF sy-tcode = 'ZVA03'.
            CLEAR wa_salesorder.
            CALL SCREEN '1003'.
          ELSE.
            PERFORM pop_up.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1001  INPUT
    *&      Module  input_help_sold_to_party  INPUT
          text
    MODULE input_help_sold_to_party INPUT.
      SELECT zkunag FROM zvbak INTO CORRESPONDING FIELDS OF TABLE
        itab.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'ZKUNAG'
      PVALKEY                = ' '
         dynpprog               = sy-cprog
         dynpnr                 = '1000'
         dynprofield            = 'ZKUNAG'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = itab
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " input_help_sold_to_party  INPUT
    *&      Form  pop_up
          text
    -->  p1        text
    <--  p2        text
    FORM pop_up .
      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
      TITLEBAR                    = ' '
      DIAGNOSE_OBJECT             = ' '
          text_question               = 'DO YOU WANT TO SAVE THE ORDER?'
         text_button_1               = 'YES'(001)
         icon_button_1               = ' '
         text_button_2               = 'No'(002)
         icon_button_2               = ' '
         default_button              = '1'
         display_cancel_button       = 'X'
         userdefined_f1_help         = ' '
      START_COLUMN                = 25
      START_ROW                   = 6
      POPUP_TYPE                  =
      IV_QUICKINFO_BUTTON_1       = ' '
      IV_QUICKINFO_BUTTON_2       = ' '
    IMPORTING
         answer                      = ans
    TABLES
      PARAMETER                   =
    EXCEPTIONS
      TEXT_NOT_FOUND              = 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.
      CASE ans.
        WHEN '001'.
          PERFORM check_ship_to_party.
          IF sy-subrc <> 0.
            MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
          ELSE.
            PERFORM check_payer.
            IF sy-subrc <> 0.
              MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
            ELSE.
              PERFORM check_bill_to_party.
              IF sy-subrc <> 0.
                MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
              ELSE.
                wa_salesorder-zernam = sy-uname.
                MOVE-CORRESPONDING wa_salesorder TO zvbak.
                MODIFY zvbak_101954.
                temp_salesitems-zvbeln = wa_salesorder-zvbeln.
                MOVE-CORRESPONDING temp_salesitems TO zvbap.
                MODIFY zvbap.
                IF sy-subrc = 0.
                  MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
                  CLEAR wa_salesorder.
                  REFRESH it_salesitems.
                  REFRESH temp_salesitems.
                  IF sy-ucomm = 'EXIT'.
                    LEAVE PROGRAM.
                  ENDIF.
                  IF sy-tcode = 'ZVA01'.
                    CALL SCREEN '1000'.
                  ELSE.
                    CALL SCREEN '1003'.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        WHEN '002'.
          IF sy-tcode = 'ZVA01'.
            CLEAR wa_salesorder.
            REFRESH it_salesitems.
            REFRESH temp_salesitems.
            CALL SCREEN '1000'.
          ELSE.
            CLEAR wa_salesorder.
            REFRESH it_salesitems.
            REFRESH temp_salesitems.
            CALL SCREEN '1003'.
            CLEAR ans.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " pop_up
    *&      Module  USER_COMMAND_1002  INPUT
          text
    MODULE user_command_1002 INPUT.
    IF sy-datar = 'X'.
       PERFORM material_check.
       IF sy-subrc <> 0.
         MESSAGE 'ENTER THE CORRECT MATERIAL' TYPE 'I'.
       ELSE.
         SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara_101954
         INTO CORRESPONDING FIELDS OF wa_salesitems
           WHERE zmatnr = wa_salesitems-zmatnr.
         wa_salesitems-znetwr =  wa_salesitems-zstprs * wa_salesitems-zbrgew.
       ENDIF.
       var = 1.
    ENDIF.
      IF sy-ucomm = 'BACK'.
        LOOP AT temp_salesitems.
          MODIFY temp_salesitems FROM wa_salesitems .
        ENDLOOP.
        it_salesitems-pick = ' '.
        CALL SCREEN '1001'.
      ENDIF.
    ENDMODULE.                 " USER_COMMAND_1002  INPUT
    *&      Module  USER_COMMAND_1000  INPUT
          text
    MODULE user_command_1000 INPUT.
      CASE sy-ucomm.
        WHEN 'NEXT'.
          SELECT * FROM zt001k_101954 INTO CORRESPONDING FIELDS OF
            temp_salesorder WHERE
            zvkorg = wa_salesorder-zvkorg AND
            zvtweg = wa_salesorder-zvtweg AND
            zspart = wa_salesorder-zspart.
          ENDSELECT.
          IF sy-subrc = 0.
            CALL SCREEN '1001'.
          ELSE.
            MESSAGE 'Invalid Data Entered' TYPE 'I'.
            CALL SCREEN '1000'.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    *&      Module  USER_COMMAND_1003  INPUT
          text
    MODULE user_command_1003 INPUT.
      IF sy-ucomm = 'NEXT'.
       IF sy-datar = ' '.
         MESSAGE 'ENTER PURCHASE ORDER NUMBER' TYPE 'I'.
         CALL SCREEN 1000.
        IF NOT wa_salesorder-zvbeln CO '0123456789'.
          MESSAGE 'PURCHASE ORDER NUMBER IS NOT IN THE EXPECTED FORMAT' TYPE 'I'.
          CALL SCREEN '1003'.
        ENDIF.
        var3 = 0.
        CALL SCREEN '1001'.
      ENDIF.
    ENDMODULE.                 " USER_COMMAND_1003  INPUT
    *&      Module  input_help_sales_order  INPUT
          text
    MODULE input_help_sales_order INPUT.
      SELECT zvbeln FROM zvbak_101954 INTO CORRESPONDING FIELDS OF TABLE
      itab1.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'ZVBELN'
      PVALKEY                = ' '
         dynpprog               = sy-cprog
         dynpnr                 = '1003'
         dynprofield            = 'ZVBELN'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = itab1
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " input_help_sales_order  INPUT
    *&      Module  back_command  INPUT
          text
    module back_command input.
    *if sy-ucomm = 'SAVE' OR 'BACK' OR 'DETAIL' OR 'EXIT' OR 'CANCEL'.
    *endif.
    endmodule.                 " back_command  INPUT
    Regards
    Rajesh Kumar

Maybe you are looking for

  • Unable to Install Oracle 11g R2(11.2.0.1.0) on RHEL 6

    I'm performing installation of Oracle 11g r2 with Server class on RHEL(installed as Desktop class) In prerequesites check i'm getting the following errors:      Checks          STATUS FIXABLE      Soft Limit: maximum user processes     FAILED     Yes

  • Reverting to old backup

    My phone was in for repair and so I backed it up before sending it away, however when I attempted to restore it the cable came out and when I reinserted it the phone synced with my itunes and created a new backup of my wiped phone and therefore seems

  • Data missing in report--HELP Emergency

    Hello All: I've a multiprovider on Cube1 and cube2. Cube 1 has data at day level while cube 2 has monthly level data. The user enters a date suppose 04/30/2007, it brings data from cube1 without any problem, what happens with cube 2. I've written a c

  • Work Flow Help

    Hi, I'm working on a project and need to know what a good approach is. I have about 50 videos. There will be a main main and several sub menus. The sub menu options will take the users to a page that displays a video to one side and then text on the

  • Drag and drop like visio

    I would like to know HOW can I start doing this... Imagine a set of icons (Jbuttons can be) that I want to copy to a middle frame. VISIO like. Then I want to add arrows between one to another or to several other dragged JButtons ... and if I drag the