Error in table control while displaying data.

Hi All,
I m doing module pool programming using Table control.
I m using one table only and declared internal table like the database table.
When I m transferring data from internal table to Table control screen, I m getting error like.
<b>A conversion error occurred while the program was trying to
display data on the screen.</b>
The filed is of DEC type and it is having some value with negative sign.
Whether I have to change field type of sceen element and if so then to which data type?
Or any other way to handle such situation.
Thanx.
Umesh.

Hello,
Please check whether the screen field name of the table control and the type
is same as the internal table that you are using to populate.
reward if helps
Thanks
Krishna
Message was edited by:
        Krishnakumar Ramadoss

Similar Messages

  • How can i extend the table control while transfering the data

    hi
    how can i extend the table control while transfering the data.

    Hi,
    For table control we have to handle the page down (P+, or what ever function codes are assigned to that activity) activity with our coding.
    Just check out this code:
    This is the bdc to update the XK01 transaction code (Vendor Creation).
    Here we will use table controls for bankings. Here Iam sending the coding and text files.
    Coding
    REPORT zprataptable2
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
    i1 TYPE i,
    lifnr LIKE rf02k-lifnr,
    bukrs LIKE rf02k-bukrs,
    ekorg LIKE rf02k-ekorg,
    ktokk LIKE rf02k-ktokk,
    anred LIKE lfa1-anred,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    land1 LIKE lfa1-land1,
    akont LIKE lfb1-akont,
    fdgrv LIKE lfb1-fdgrv,
    waers LIKE lfm1-waers,
    END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
    j1 TYPE i,
    banks LIKE lfbk-banks,
    bankl LIKE lfbk-bankl,
    bankn LIKE lfbk-bankn,
    END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\first1.txt'
    filetype = 'DAT'
    TABLES
    data_tab = itab.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\second.txt'
    filetype = 'DAT'
    TABLES
    data_tab = jtab.
    LOOP AT itab.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-KTOKK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RF02K-LIFNR'
    itab-lifnr.
    PERFORM bdc_field USING 'RF02K-BUKRS'
    itab-bukrs.
    PERFORM bdc_field USING 'RF02K-EKORG'
    itab-ekorg.
    PERFORM bdc_field USING 'RF02K-KTOKK'
    itab-ktokk.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-LAND1'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFA1-ANRED'
    itab-anred.
    PERFORM bdc_field USING 'LFA1-NAME1'
    itab-name1.
    PERFORM bdc_field USING 'LFA1-SORTL'
    itab-sortl.
    PERFORM bdc_field USING 'LFA1-LAND1'
    itab-land1.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFA1-KUNNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
    cnt = cnt + 1.
    CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-banks.
    CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankl.
    CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankn.
    IF cnt = 5.
    cnt = 0.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=P+'.  " Page down activity
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(02)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    ENDIF.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-FDGRV'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFB1-AKONT'
    itab-akont.
    PERFORM bdc_field USING 'LFB1-FDGRV'
    itab-fdgrv.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-ZTERM'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB5-MAHNA'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFM1-WAERS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFM1-WAERS'
    itab-waers.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-LIFNR'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=YES'.
    PERFORM bdc_transaction USING 'XK01'.
    ENDLOOP.
    PERFORM close_group.
    **Flat files for the above code***
    Intial screen data file.
    1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
    2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
    Table control Data:
    1 in sb 11000
    1 in sb 12000
    1 in sb 13000
    1 in sb 14000
    1 in sb 15000
    1 in sb 16000
    1 in sb 17000
    1 in sb 18000
    1 in sb 19000
    1 in sb 20000
    1 in sb 21000
    1 in sb 22000
    2 in sb 21000
    2 in sb 22000
    Regards,
    Kumar.

  • How can we get a Scrolling in Table Control while data uploading?.

    Can anybody suggest me the way to put a scrolling in a table control while uploading the data?

    Hello,
    I dont think it is possible, anyways dont do it. It will make the program perfomance very bad. There is an indicator (little watch on the left hand side), that you can use, but it is better to dont do it. As I have told you the perfomance will be very bad.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          percentage = 20
          text       = 'Uploading data'.
    THAT IS THE FM. Use it after and before the upload.
    Hope this helps
    Gabriel

  • How can I use table control to enter data

    Hi all,
    I want to use table control to enter data, instead of using textboxes.
    So that the user can enter many data at once and just click the save button at the end of the work, only one click.
    How can I use the table control at this context?
    Thanks.
    Deniz.

    Hi deniz,
    go through it:
    /people/ravishankar.rajan/blog/2007/02/23/an-easier-way-of-displaying-and-editing-data-using-table-control
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/code%2bto%2bhandle%2bmultiple%2brecords%2bin%2bbdc%2btable%2bcontrol
    Regards,

  • PO_CREATE  error Buffer table not up to date

    Hi experts ,
    I am create PO using a BAPI, BAPI_POEC_CREATE.And I can see the return messages from this FM its saying that u201C PO has been creating with some numberu201D But I am not able to find the PO in my system  . And I tried to save and commit the data base . But still I am getting error Buffer table not up to date   when I calls the FM BBP_PD_PO_SAVE.
    Sample coding part of my program
    CALL FUNCTION 'BAPI_POEC_CREATE'
       EXPORTING
         I_PO_HEADER            = P_PO_HEADER
      IMPORTING
        E_PO_HEADER            = PO_RETURN_HEADER
    TABLES
        I_PO_ITEMS                 = P_PO_ITEMS
        I_PO_ACCASS             = P_PO_ACCASS
        I_PO_PARTNER             = P_PO_PARTNER
        I_PO_ORGDATA           = P_PO_ORGDATA
        RETURN                        = P_PO_BASKET_ERRORS.
    PO_GUID = PO_RETURN_HEADER-BUSINESSPROCESS.
      CALL FUNCTION 'BBP_PD_PO_SAVE'
        EXPORTING
          IV_HEADER_GUID = PO_GUID.
      CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.
        COMMIT WORK AND WAIT.
    Can anybody give me some pointers to resolve this issue .
    Thank you ,

    Hi Sumat
    Thanks for reply .
    But , I am facing the error on the saving the PO itself . Its dumping wit the error Buffer table not up to date
    CALL FUNCTION 'BBP_PD_PO_SAVE'
    EXPORTING
    IV_HEADER_GUID = PO_GUID.
    Thank you ,
    Edited by: Dhareppa Havalagi on Jul 10, 2009 4:00 AM

  • Table control in display mode

    Hello All,
    Please tell me how to show table control in display mode,
    My requirement is , whenever ill put T-code for table maintainace it should be appear in display mode.
    Thanks,
    Gaurav

    table control or table maintenance?
    Ok, let me assume that you have table mainteance view done for ZTEST table with Z_V_TABLE (maintenance view generated)
    create a tcode now
    1) transaction with parameters - se93 - tcode Z_TABLE
    2) Transaction SM30
    3) skip initial screen checked
    4) maintain below values in default values in se93
    VIEWNAME     Z_V_TABLE
    SHOW     X
    now when we run with Z_TABLE table it will always show in display mode.
    Hope - I understood your question correctly

  • How to handle the table control While working with LSMW?

    How to handle the table control While working with LSMW?

    its possible in lsmw,
    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, it that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Thanks

  • Set cursor position within table control while scrolling

    hi,
    Anybody can guide me how to set the cursor with in table control while scrolling down,normally it is going to first input filed.
    Thanks and Regards,
    palani.

    Hi Palani,
    Could you please share with me what all you have done regarding get and set cursor. I am facing similar problem where
    I have made a Z Table Control where i have given vertical and horizontal scrolling . Now when I scroll and try to select a row, then ZTABLE_CONTROL-CURRENT_LINE fetches line number not from the top, it fetches from the current top of ztablecontrol.
    It is onlyy changing the value on scrolling, if i do not scroll table control then value is coming correct.
    My requirement is whenever i select any row of ZTABLE CONTROL i need to get the curent line number from top. Please guide me what should i do.
    Early reply will be rewarded.
    Thanks.

  • Urgent: Error while displaying data in OBIEE answers

    Hi,
    I'm facing an issue in OBIEE answers when trying to display values from my fact table. It is displaying something like invalid column identifier in oci call stmt execute...
    I have three dimensions and that particular column is in three dimensional tables and i changed the names and placed in fact table.
    when i'm trying to view data in physical layer it is displaying data.
    why i'm facing this error.. How can I resolve this??
    Its very urgent requirement and any help will be appreciable..
    Regards,
    Sindhu

    Hi,
    I changed the column names in BMM only. Not in physical layer. In physical layer i'm able to view data.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 904, message: ORA-00904: "T95877"."OBSERVATION_DATETIME": invalid identifier at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT "FACT - RISK SLOT Overtime"."In Gas Price Value ID" saw_0 FROM "AO Risk" ORDER BY saw_0
    I'm getting this error...
    Regards,
    Sindhu

  • Table Control not displaying selected data

    I have 2 screens, screen 100 is the selection screen where i select the data to be displayed and 300 is my table control.  When I select a single airline in screen 100, it displays all the airlines in my table control in screen 300, how can i fix?

    Table control if built via the screen painter wizard uses the contents of internal table declared in the main program and defined in the wizard to display. Check how you are filling this table, perhaps your filling it incorrectly.

  • How to change font while displaying data through an ALV table in WDA?

    Hi all,
    I am displaying data through and ALV table. Now I want to change the FONT only for few rows. Is this possible?
    If so then do the needful to me..
    Thanks & Regards,
    Yugesh A.

    I believe as you have found 'LVC_FIELDCATALOG_MERGE' would only work with the classic dynpro (SAPGUI based) version of the ALV. 
    You won't be able to control the font the same way in the WDA version of the ALV.  You will need to create a custom cell editor for the column(s) in question.  You can then bind context attributes to the properties of the cell editor. You will need extra attributes in your bound context to control these settings on the row level.  Also you will be restricted by the changing the DESIGN property. This means only the values allowed for the DESIGN of the particluar UI element.  For a TextView that wouldn't be the font directly (the font of course comes from the Theme).
    DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv_adv( ).
      DATA l_table TYPE REF TO cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
      data textview type ref to CL_SALV_WD_UIE_TEXT_VIEW.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'ADD_PARTICIPANTS' ).
      create object textview.
      textview->SET_TEXT_FIELDNAME( 'ADD_PARTICIPANTS' ).
      textview->set_design_fieldname( 'ADD_DESIGN' ).
      textview->set_wrapping( abap_true ).
      l_column->set_cell_editor( textview ).
    DESIGN supports the following options:
    Value
    Visual Display
    Description
    emphasized
    Text is highlighted in default size
    groupTitle
    Header for forms
    This enumeration value is deprecated. Instead, use SectionHeader.
    header1
    Text is highlighted with font size +4 in relation to the default font size.
    header2
    Text is highlighted with font size +5.08 cm relation to the default font size.
    header3
    Text is highlighted in default size
    header4
    Text is highlighted in font size -1 (small) in relation to the default font size (like the legend but highlighted)
    label
    Text is display in the default font type. A space is always inserted after the text.
    label_small
    Text is displayed in default font type, as with label, onyl that font size is -1 (like the font size for header4).
    legend
    Text is displayed with default font type in size -1.
    reference
    Text is in italics and in default font size.
    standard
    Text is displayed in default font size. No text attributes are defined for this value.
    monospace
    Text is displayed in no-proportional font type. Each letter takes up the same space.

  • Initial value in table control is displayed as space for currency field

    Hi Experts,
    I have a problem with table control in module pool. Below is the code for populating the table control:
      loop at   GT_NEW_ABAN
           into GT_NEW_ABAN_WA
           with control TAB_FAC_ABAND
           cursor TAB_FAC_ABAND-current_line.
        module TAB_FAC_ABAND_get_lines.
    *&spwizard:   module TAB_FAC_ABAND_change_field_attr
      endloop.
    The internal table GT_NEW_ABAN and the work area GT_NEW_ABAN_WA are declared as below:
    DATA: GT_NEW_ABAN LIKE ZTABANDON OCCURS 0 WITH HEADER LINE,
       GT_NEW_ABAN_WA LIKE ZTABANDON ,
    while debugging the value of a field in GT_NEW_ABAN_WA is coming as 0.00, but in the screen display it is coming as space.
    In the structure ZTABANDON the data type of the particular field is CURR, and in the layout it is DEC.
    How can I fetch the same value 0.00 as coming in the work area to the screen display? How to change the space to 0.00?
    Regards,
    Soumya.

    Hi,
    In the screen painter double click on the fieldname. It will show the properties. There make the type of the field as Currency(CURR I think).
    Regards,
    Renjith Michael.
    Edited by: Renjith Michael on Jan 12, 2008 4:18 PM

  • Conversion error in Table control for Negative values

    hello all,
    Iam using table control with 6 columns and in that columns values are coming from Ztable. and out of that one column is of value which is input/output field and having negative value's also.type of that column is DEC.
    Now when i run the report dump occurs showing error message as COnversion Error.
    I think its because of negative value even the in attributes of that column i had selected With Sign checkbox.
    Now when i run the report then if in Ztable negative value is there then i want to display negative value in table control also.
    Please suggest me...
    <removed_by_moderator>
    Thanking you.
    Regards.
    Edited by: Hemant Baviskar on Sep 10, 2008 3:07 PM
    Edited by: Julius Bussche on Sep 10, 2008 1:13 PM

    Hemant
    Refer to following link:
    Table Control : Conversion error
    Thanks
    Amol Lohade

  • 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

  • Invalid field format (screen error) on Table Control

    Hello,
    When selecting a line or multiple lines on a screen made by me(using a Table Control), I get Invalid field format (screen error). Debugging the code it sends the message when looping the internal table on PAI to check if there were values changed. Is there a reason why this error appears on this?
      loop at it_values.
        chain.
          field pvalues-BEGDA.
          module CHANGE_QUEUE.
        endchain.
      endloop.
    Thanks.

    No need to loop to check whether data is changed after PBO, just check System Field SY-DATAR, it will be set to 'X' if any field was changed.
    So the following code is enough;
    IF SY-DATAR EQ 'X'.
       PERFORM SAVE_DATA.
    ENDIF.
    Regards
    Karthik D

Maybe you are looking for

  • Issue with SAP BW Report Iview

    Hi, The issue stands with the context menu(right click menu) I have created a BI Query and generated a BW Report with the Web Designer Wizard. When I run the generated URL it is working fine, with the context menu also working perfectly. However when

  • Creating a XML file from XSD file

    Is there a piece of Java code that will convert a file to XML using a XSD without the use of generated Java classes? Thanks alot, Amy

  • Header Footer in Oracle Reports

    Can we print header,footer and mainsection in the same page in oracle reports?

  • Needs to be fixed immediately...

    I brought the phone with me in the car the other day.  It was very sunny and I couldn't see it well.  I changed the settings but it didn't matter.  I had people with me who had Blackberry's whose screens were blowing mine away.  It was so bad they we

  • Background turns blue when opening new file or exiting file.

    Hello, I am working in Photoshop cs6 on a PC, Windows 7.  I was working on my Wacom tablet and accidentally dropped my pen tool on the tablet.  When I looked up, my background was blue.  I'm not sure what happened, but I can't figure out how to chang