Block field in program

Hello sap guys,
I need to block a field in a standard program, so it couldn't be modified, so when the user saves the transaction,  the program stores always the same value that is shown at first in the program.
How can I do this, what concept should I use?
Thanks for your help !!

Depends on which field / screen / transaction.
Some such can be set in customising, sometimes Transaction Variant will achieve this, otherwise may need to use exit of some type - Possibly FI Substitution, Business Transaction Event, Customer Exit, BADI.  May even need to be enhancement or repair in some cases.
Suggest you post more details so forum readers can respond in more detail.
Andrew

Similar Messages

  • MIR5 Payment block field

    Hi experts,
    I am using TCode MIR5 with a standard layout on an ECC6.0 system.
    The field 'Payment Block' is showing as null for the range of invoice parties that I have selected to display.
    When I drilldown into the invoice the field 'Pmnt Block' from the 'Payment' tab shows 'R invoice verification'.
    And in the RBKP table this field is empty.
    Do you know why this field is not well filled in the RBKP table ?
    Thanks a lot for your answer.
    Best regards
    Fabrice Brun

    Hello,
    I can see some of my invoice documents which are blocked but not all of them.
    What I want to do is select in a program all the blocked invoice documents (which I can see in the table RBKP_BLOCKED) but whith the good payment payment block field I can see in the MIR4 transaction in the 'Payment' tab.
    Do you know how can I do.
    Thanks a lot for your answer ?
    Best regards.
    Fabrice Brun

  • Coding block fields in recurring documents

    I have a recurring document created with some coding block fields.During the entry (FBD1)  ,those fields are open and was able to enter the data .During display (FBD3),the data is there.But when I posted some documents(Batch session) using the reference document,the coding block data is not populated on the actual document.I checked SAPF120 and SAPF120G programs and both are active.What could be the problem and why the data in those coding block fields are not getting populated on the actual documents?Thanks

    I also facing the same problem of, how to add customer fields to Vendor/Customer entry screen. For me, i already check all field status that involve (for GL OBC4 and for posting key) and they are all optional.
    I think it's about the screen number 0302 which will be used for vendor line item entry, while other GLs will used 0300. I already maintain the coding block but still don't know how the system works to use that coding block for the screens.
    someone pleasszzz.. help us.
    Thanks

  • Purch Block field in SRM vendor record?

    Hi,
    We are on SRM 5.0 and I have a question on the vendor block
    For the functionality for vendor blocks (manage business partners), why is the Purch Block field in 'vendor data' blocked?. i have blocked the vendor in r/3, executed the vendor update job but cannot where the vendor block is set on the SRM vendor record
    please input.
    warmest regards, Pooja.

    Hi Muthu,
    Thankyou once again for getting back to me. I am fully aware of t-code BP, however,the field 'xblck' field does not get automatically flagged when a vendor is blocked in our r/3 system. my understanding was that SRM would follow the process as:
    1. vendor is blocked in r/3, say purchasing block
    2. srm program BBP_VENDOR_SYNC runs between srm and r/3
    3. field 'xblck' is auto updated in t-code BP, so that vendor cannot be used in srm transactions.
    step 3 does not work. Is this as a result of BBP_VENDOR_SYNC being the incorrect abap to run?
    warmest regards, Pooja

  • Update the data into the ZTABLE fields thru program logic ..?

    hi all,
    i have ZTABLE1,ZTABLE2,ZTABLE3, and this tables like ALV grids using object methods.
    in the same table fields now i wanted to update the data into the ZTABLE fields thru program logic .
    could anyone please help me ....
    please provide if anyone of have any program logic that would be helpfull to me.
    thanks in advance...
    srinivas....

    Hi Srinivas,
      The following statements are used to upload the data into custom tables.
    1. Modify
    2. Update
    3. Insert
    if you are using OO ALV, you should enable the 'SAVE' button in the main toolbar. if the user press the save button, then you should upload the data to the custom table.
    please find the example code, in this example 'PERFORM F_SAVE_DATA'(here i gave the message only, you write your own logic here) is used to save the data in custom table.
    Report Program: ZB_ALVOOPS_TEST
    Line:-----
    REPORT  ZB_ALVOOPS_TEST MESSAGE-ID ZCR_MESSAGES.
    Top Include - Global Data Declaration                        *
    INCLUDE ZB_ALVOOPS_TEST_TOP.
    SEL Include - Selection Screen                               *
    INCLUDE ZB_ALVOOPS_TEST_SEL.
    AT SELECTION SCREEN                                          *
    Initialization Event                                         *
    INITIALIZATION.
    Initialize Screen Number.
      PERFORM F_INITIALIZE.
    Initialize Field Catalog for ALV Grid.
      PERFORM F_INITIALIZE_GRID.
    END-OF-SELECTION.
    Call Display Screen                                          *
      CALL SCREEN 9000.
    Event Handler - Class Definition and Implementation          *
      INCLUDE ZB_ALVOOPS_TEST_CL01.
    PBO Event - Module Implementation                            *
      INCLUDE ZB_ALVOOPS_TEST_PBO.
    PAI Event - Module Implementation                            *
      INCLUDE ZB_ALVOOPS_TEST_PAI.
    Subroutine Include                                           *
      INCLUDE ZB_ALVOOPS_TEST_F01.
    Include: ZB_ALVOOPS_TEST_TOP
    Line:-------
    Type Declaration For Internal Tables                         *
    Collection Data
    TYPES: BEGIN OF TY_MARA                                                    ,
             MATNR         TYPE  MATNR                                         ,  "  Material
             VPSTA         TYPE  VPSTA                                         ,  "  Maintenance status of complete material
             MTART         TYPE  MTART                                         ,  "  Material Type
             MBRSH         TYPE  MBRSH                                         ,  "  Industry Sector
             MATKL         TYPE  MATKL                                         ,  "  Material Group
             BISMT         TYPE  BISMT                                         ,  "  Old material number
             MEINS         TYPE  MEINS                                         ,  "  Base Unit of Measure
             BSTME         TYPE  BSTME                                         ,  "  Order unit
             BRGEW         TYPE  BRGEW                                         ,  "  Gross weight
             MAKTX         TYPE  MAKTX                                         ,  "  Material Description
             ROWCOLOR      TYPE  CHAR4                                         ,  "  Row Color
           END OF TY_MARA                                                      .
    Flag                                                         *
    DATA: FG_REFRESH  TYPE  XFLD                                               ,  "  Used to Refresh ALV
          FG_SAVE     TYPE  XFLD                                               .  "  Data Saved Or Not.
    Internal Table Declaration                                   *
    DATA: IT_MARA              TYPE  STANDARD TABLE OF TY_MARA                 ,  "  Internal table for Material
          WA_MARA              TYPE  TY_MARA                                   .  "  Workarea for Material
    Variable Declaration For General Constants                   *
    CONSTANTS: C_SCREEN_SELECT      TYPE  SYDYNNR         VALUE '9001'         ,  "  Selection Screen Number
               C_SCREEN_SELECT_NIL  TYPE  SYDYNNR         VALUE '9002'         ,  "  Empty Screen Number
               C_STATUS9000         TYPE  CHAR10          VALUE 'STATUS9000'   ,  "  PF-Status
               C_TITLEBAR           TYPE  CHAR4           VALUE '9000'         ,  "  Title Bar
               C_ISSUE_CONTAINER    TYPE  SCRFNAME        VALUE 'WORKCONTAINER',  "  Container Name (Screen Painter)
               C_BUTTON_TYPE        TYPE  CHAR1           VALUE '3'            ,  "  Button Type
               C_EXECUTE            TYPE  CHAR4           VALUE 'SELE'         ,  "  Functions 'SELE'    -> Execute
               C_BACK               TYPE  CHAR4           VALUE 'BACK'         ,  "  Functions 'BACK'    -> Back to main screen
               C_ENTER              TYPE  CHAR5           VALUE 'ENTER'        ,  "  Functions 'ENTER'   -> No Action
               C_SEL01              TYPE  CHAR5           VALUE 'SEL01'        ,  "  Functions 'SEL01'   -> Toggle Function
               C_SAVE               TYPE  CHAR4           VALUE 'SAVE'         ,  "  Functions 'SAVE'    -> Save Function
               C_REFRESH            TYPE  CHAR7           VALUE 'REFRESH'      ,  "  Functions 'REFRESH' -> Clear and Fres All objects
               C_ADD_MI             TYPE  CHAR6           VALUE 'ADD_MI'       ,  "  Functions 'ADD_MI'  -> Add New Media Issue
               C_TRUE               TYPE  CHAR1           VALUE 'X'            ,  "  Set X value
               C_REQUIRED           TYPE  CHAR1           VALUE '1'            ,  "  Un-Confirmed Qty field obligatory or not.
               C_INPUT              TYPE  CHAR1           VALUE '0'            ,  "  Reason field should not be input.
               C_ALV_SAVE           TYPE  CHAR1           VALUE 'A'            ,  "  ALV
               C_ERROR              TYPE  CHAR1           VALUE 'E'            ,  "  Error Type
               C_SIGN               TYPE  CHAR1           VALUE 'I'            ,  "  Sign
               C_OPTION             TYPE  CHAR2           VALUE 'EQ'           ,  "  Option.
               C_COMMIT_WAIT        TYPE  CHAR1           VALUE '5'            ,  "  Waiting to update in DB
               C_TABNAME            TYPE  CHAR1           VALUE '1'            ,  "  Parameter (ALV)
               C_CANCEL             TYPE  CHAR1           VALUE 'N'            ,  "  Cancel
               C_YES                TYPE  CHAR1           VALUE 'J'            .  "  Yes.
    Variable Declaration For Container and ALV Grid              *
    DATA: OBJ_CUST_CONTAINER  TYPE  REF TO  CL_GUI_CUSTOM_CONTAINER            ,  "  Container Class
          OBJ_CUST_GRID       TYPE  REF TO  CL_GUI_ALV_GRID                    .  "  ALV  Grid Class
    Field Catalog Declaration For Container and ALV Grid         *
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT                                        ,  "  Field Catalog
          IT_EXCLUDE   TYPE  UI_FUNCTIONS                                      ,  "  Standard Function Exclude from ALV
          WA_FIELDCAT  TYPE  LVC_S_FCAT                                        ,  "  For Field Catalog
          WA_LAYOUT    TYPE  LVC_S_LAYO                                        .  "  ALV Layout
    Global Variable Declaration                                  *
    DATA: OK_CODE                  TYPE  SY-UCOMM                              ,  "  OK CODE ( Screen Attribute Don't Change the var.name)
          G_SAVE_CODE              TYPE  SY-UCOMM                              ,  "  OK CODE
          G_ANSWER                 TYPE  CHAR1                                 ,  "  OK or Cancel.
          G_SELECTION_DYNNR        TYPE  SYDYNNR                               ,  "  Screen Number
          G_ERROR_TEXT             TYPE  CHAR128                               ,  "  Error Text
          G_SELECTION_TOGGLE_TEXT  TYPE  CHAR50                                ,  "  Toggle Text, Value: Hide Selection, Show Selection
          G_MATNR                  TYPE  MATNR                                 ,  "  Material
          G_SMATNR                 TYPE  MATNR                                 ,  "  Material
          G_SMTART                 TYPE  MTART                                 .  "  Material Type
    Include: ZB_ALVOOPS_TEST_SEL
    Line:-------
    Selection Screen
    SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN                           .
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE TEXT-001          .
    SELECT-OPTIONS: S_MATNR  FOR G_SMATNR                                        ,  "  Material
                    S_MTART  FOR G_SMTART                                        .  "  Material Type
    SELECTION-SCREEN   END OF BLOCK SELECTION                                    .
    SELECTION-SCREEN   END OF SCREEN 9001                                        .
    Empty Selection
    SELECTION-SCREEN BEGIN OF SCREEN 9002 AS SUBSCREEN                           .
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION_NIL WITH FRAME TITLE TEXT-002      .
    Nil
    SELECTION-SCREEN   END OF BLOCK SELECTION_NIL                                .
    SELECTION-SCREEN   END OF SCREEN 9002                                        .
    Include: ZB_ALVOOPS_TEST_CL01
    Line:-------
    CLASS lcl_event_handler DEFINITION                                  *
    Event Handler Class Definition                                      *
    CLASS LCL_EVENT_HANDLER DEFINITION.
      PUBLIC SECTION.
        METHODS:
        HANDLER_TOOLBAR      FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
                                 IMPORTING  E_OBJECT E_INTERACTIVE     ,
        HANDLER_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
                                 IMPORTING E_UCOMM                     .
    ENDCLASS.                    "lcl_event_handler DEFINITION
    CLASS lcl_event_handler IMPLEMENTATION                              *
    Event Class Implementation.                                         *
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    Toolbar -----Create 'Add Issue' button
      METHOD HANDLER_TOOLBAR.
        DATA:  L_WA_TOOLBAR  TYPE  STB_BUTTON.                                          "  Toolbar
        CLEAR: L_WA_TOOLBAR.
    Button Type
        L_WA_TOOLBAR-BUTN_TYPE  =  C_BUTTON_TYPE   .            "  3.
        APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
    Add Issue Button.
        CLEAR: L_WA_TOOLBAR.
        L_WA_TOOLBAR-FUNCTION   =  'ADD_MI'   .                                         "  'ADD_MI'   .
        L_WA_TOOLBAR-ICON       =  'ICON_CREATE'.
        L_WA_TOOLBAR-QUICKINFO  =  'CREATE'   .                                         "  'Add Issue'.
        L_WA_TOOLBAR-TEXT       =  'CREATE'   .                                         "  'Add Issue'.
        L_WA_TOOLBAR-DISABLED   =  ''.
        APPEND L_WA_TOOLBAR TO E_OBJECT->MT_TOOLBAR.
        CLEAR: L_WA_TOOLBAR.
      ENDMETHOD.                    "handler_toolbar
    User Actions Events-- Handle 'Add Issue' Button Click.
      METHOD HANDLER_USER_COMMAND.
        CASE E_UCOMM.
    Add Issue Button.
          WHEN C_ADD_MI.
            IF NOT G_MATNR IS INITIAL.
              FG_REFRESH  =  C_TRUE.
              PERFORM F_ADD_MEDIAISSUE.
            ENDIF.
        ENDCASE.
    Refresh Control
        CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2
            OTHERS            = 3.
    Handle Exceptions
        IF SY-SUBRC <> 0.
          CASE SY-SUBRC.
            WHEN 1.
              G_ERROR_TEXT = TEXT-026.                                        "  'Control System Error'.
            WHEN 2.
              G_ERROR_TEXT = TEXT-027.                                        "  'Control CL_GUI_CFW Has Raised Error'.
          ENDCASE.
            MESSAGE G_ERROR_TEXT TYPE 'E'.
        ENDIF.
    Refresh Alv Grid.
        PERFORM F_REFRESH_GRID.
      ENDMETHOD.                    "handler_user_command
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    Object Ref. Event Class.
    DATA: OBJ_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER.
    Include: ZB_ALVOOPS_TEST_PBO
    Line:----
    Module  STATUS_9000  OUTPUT                                        *
    Set PF-Status                                                      *
    MODULE STATUS_9000 OUTPUT.
    PF Status
      SET PF-STATUS C_STATUS9000  .
      SET TITLEBAR  C_TITLEBAR    .
    ENDMODULE.                 " STATUS_9000  OUTPUT
    Module  Create_Alvgrid  OUTPUT                                     *
    Create Or Refresh ALV Grid                                         *
    MODULE CREATE_ALVGRID OUTPUT.
      PERFORM F_PROCESS_ALV .
      PERFORM F_REFRESH_GRID.
    ENDMODULE.                 " create_alvgrid  OUTPUT
    Include: ZB_ALVOOPS_TEST_PAI
    Line:----
    Module  exit_command  INPUT                                        *
    Exit Command ( Cancel and Exit )                                   *
    MODULE EXIT_COMMAND INPUT.
      LEAVE PROGRAM.
    ENDMODULE.                 " exit_command  INPUT
    Module  user_command_9000  INPUT                                   *
    User Command - Process toolbar Events                              *
    MODULE USER_COMMAND_9000 INPUT.
    Take an Action based on user Input
      G_SAVE_CODE = OK_CODE.
      CLEAR OK_CODE.
      CASE G_SAVE_CODE.
    Back
        WHEN C_BACK .
    Raise the Confirmation Message When User not saved the data.
          IF FG_SAVE = C_YES.
            PERFORM F_EXITCHECK CHANGING G_ANSWER .
            IF G_ANSWER = C_YES.
              PERFORM F_SAVE_DATA.
            ELSE.
              CLEAR G_SAVE_CODE.
            ENDIF.
            CLEAR: FG_SAVE.
          ENDIF.
          LEAVE PROGRAM.
    Enter
        WHEN C_ENTER.
    Execute ( F8 )
        WHEN C_EXECUTE .
          IF IT_MARA IS INITIAL.
            PERFORM F_SELECTMATERIAL.
          ENDIF.
    Toggle Button
        WHEN C_SEL01.
          PERFORM F_TOGGLE_SELECTION_SCREEN.                                  " USING ok_code.
    SAVE  ( CTRL+S )
        WHEN C_SAVE.
          IF NOT G_MATNR IS INITIAL.
            PERFORM F_SAVE_DATA.
            CLEAR: G_MATNR.
          ENDIF.
    New Entry ( CTRL+F1 )
        WHEN C_REFRESH.
          PERFORM F_REFRESH_DATA.
      ENDCASE.
    ENDMODULE.                 " user_command_9000  INPUT
    Include: ZB_ALVOOPS_TEST_F01
    Line:----
    Form  f_toggle_selection_screen                                    *
    Toggle Function - Hide Selection / Show Selection                  *
    FORM F_TOGGLE_SELECTION_SCREEN.
    Toggle Function
      IF G_SELECTION_DYNNR = C_SCREEN_SELECT.
        G_SELECTION_DYNNR = C_SCREEN_SELECT_NIL.
        G_SELECTION_TOGGLE_TEXT = TEXT-902.
      ELSE.
        G_SELECTION_DYNNR = C_SCREEN_SELECT.
        G_SELECTION_TOGGLE_TEXT = TEXT-901.
      ENDIF.
    ENDFORM.                    " f_toggle_selection_screen
    Form  f_initialize
    Initialize Screen Number and Text
    FORM F_INITIALIZE .
    Initialize Screen Number
      G_SELECTION_DYNNR      = C_SCREEN_SELECT.
      G_SELECTION_TOGGLE_TEXT = TEXT-901.
    ENDFORM.                    "f_initialize
    Form  f_selectmaterial                                           *
    FORM F_SELECTMATERIAL .
    Select the data from Mara Table
      SELECT A~MATNR
             A~VPSTA
             A~MTART
             A~MBRSH
             A~MATKL
             A~BISMT
             A~MEINS
             A~BSTME
             A~BRGEW
             B~MAKTX
        INTO TABLE IT_MARA
        FROM MARA AS A INNER JOIN MAKT AS B ON AMATNR = BMATNR
       WHERE A~MATNR IN S_MATNR
         AND A~MTART IN S_MTART
         AND B~SPRAS = 'EN'.
      IF SY-SUBRC = 0.
        FG_REFRESH  =  C_TRUE.
        FG_SAVE     =  C_YES .
        G_MATNR     =  C_TRUE.
        LOOP AT IT_MARA INTO WA_MARA WHERE BRGEW >= 200.
          WA_MARA-ROWCOLOR  =  'C310'.
          MODIFY IT_MARA FROM WA_MARA.
        ENDLOOP.
      ELSE.
        MESSAGE 'No data Found' TYPE 'E'.
      ENDIF.
    ENDFORM.                    " f_selectmaterial
    Form  f_initialize_grid                                            *
    Initialize Field Catalog.                                          *
    FORM F_INITIALIZE_GRID .
      field catalog
      PERFORM F_ATTRFCAT USING :
                       'MATNR'  '1' '0'   TEXT-005       '15' '0' 'X' ' ' ' ',
                       'VPSTA'  '1' '1'   TEXT-006       '15' '0' 'X' ' ' ' ',
                       'MTART'  '1' '2'   TEXT-007       '15' '0' ' ' ' ' ' ',
                       'MBRSH'  '1' '3'   TEXT-008       '15' '0' ' ' ' ' ' ',
                       'MATKL'  '1' '4'   TEXT-009       '15' '0' ' ' 'X' ' ',
                       'BISMT'  '1' '5'   TEXT-010       '15' '0' ' ' ' ' ' ',
                       'MEINS'  '1' '6'   TEXT-011       '15' '0' ' ' ' ' ' ',
                       'BSTME'  '1' '7'   TEXT-012       '15' '0' ' ' ' ' ' ',
                       'MAKTX'  '1' '8'   TEXT-013       '15' '0' ' ' ' ' 'C711',
                       'BRGEW'  '1' '9'   TEXT-014       '15' '0' ' ' ' ' ' '.
    Set Editable Fields in ALV.
      PERFORM F_SETEDIT_FIELDS CHANGING IT_FIELDCAT.
    ENDFORM.                    "f_initialize_grid
    Form  f_setedit_fields                                             *
    Set Editable Fields in ALV                                         *
    C_IT_FIELDCAT  <--  Field Catalog                                  *
    FORM F_SETEDIT_FIELDS  CHANGING C_IT_FIELDCAT TYPE LVC_T_FCAT.
    Local Variable Declaration.
      DATA: LS_FIELDCAT LIKE LINE OF C_IT_FIELDCAT.                           "  Field Catalog
    Create Editable Fields.
      LOOP AT C_IT_FIELDCAT INTO LS_FIELDCAT.
        CASE LS_FIELDCAT-FIELDNAME.
          WHEN 'BRGEW'.
            LS_FIELDCAT-EDIT = C_TRUE.
          WHEN 'MAKTX'.
            LS_FIELDCAT-EDIT = C_TRUE.
        ENDCASE.
        MODIFY C_IT_FIELDCAT FROM LS_FIELDCAT.
      ENDLOOP.
    ENDFORM.                    " f_setedit_fields
    Form  f_attrfcat                                                   *
    Update Field Catalog Internal Table                                *
    U_FIELDNAME     -->  Field Name                                    *
    U_ROW_POS       -->  Row Position                                  *
    U_COL_POS       -->  Column Position                               *
    U_SELTEXT_L     -->  Display Column Heading                        *
    U_OUTPUTLEN     -->  Heading Output Length                         *
    U_DECIMALS_OUT  -->  Number of decimal places in output            *
    U_KEY           -->  Key in ALV Display                            *
    U_FIX           -->  Existence of fixed values                     *
    FORM F_ATTRFCAT USING
                        U_FIELDNAME    TYPE  SLIS_FIELDNAME
                        U_ROW_POS      TYPE  SYCUROW
                        U_COL_POS      TYPE  SYCUCOL
                        U_SELTEXT_L    TYPE  SCRTEXT_L
                        U_OUTPUTLEN    TYPE  OUTPUTLEN
                        U_DECIMALS_OUT TYPE  CHAR1
                        U_KEY          TYPE  CHAR1
                        U_FIX          TYPE  VALEXI
                        U_COL_COLOR    TYPE  LVC_EMPHSZ.
    Update field catalog.
      WA_FIELDCAT-FIELDNAME    = U_FIELDNAME.
      WA_FIELDCAT-ROW_POS      = U_ROW_POS.
      WA_FIELDCAT-COL_POS      = U_COL_POS.
      WA_FIELDCAT-COLTEXT      = U_SELTEXT_L.
      WA_FIELDCAT-SELTEXT      = U_SELTEXT_L.
      WA_FIELDCAT-OUTPUTLEN    = U_OUTPUTLEN.
      WA_FIELDCAT-DECIMALS_O   = U_DECIMALS_OUT.
      WA_FIELDCAT-KEY          = U_KEY.
      WA_FIELDCAT-VALEXI       = U_FIX.
      WA_FIELDCAT-EMPHASIZE    = U_COL_COLOR.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "ATTR_FCAT
    Form  f_refresh_data                                               *
    Clear All the objects used in the program ( Data Related )         *
    FORM F_REFRESH_DATA .
    Clear All the Objects Used in Our Program.
      CLEAR: S_MATNR      ,
             S_MTART      ,
             IT_MARA      ,
             OK_CODE      ,
             FG_REFRESH   ,
             FG_SAVE      ,
             G_SAVE_CODE  ,
             G_MATNR      .
      FREE:  S_MATNR      ,
             S_MTART      ,
             IT_MARA      ,
             OK_CODE      ,
             FG_REFRESH   ,
             FG_SAVE      ,
             G_SAVE_CODE  ,
             G_MATNR      .
    Refresh Alv.
      FG_REFRESH  =  C_TRUE.
    ENDFORM.                    " f_refresh_data
    Form  f_process_alv                                                *
    1. Create Custom Container                                         *
    2. Create ALV Grid                                                 *
    3. Exclude Standard Functions                                      *
    4. Display the ALV                                                 *
    5. Register the Events.                                            *
    FORM F_PROCESS_ALV .
    Display ALV
    Custom Container
      IF OBJ_CUST_CONTAINER IS INITIAL.
        CREATE OBJECT OBJ_CUST_CONTAINER
          EXPORTING
            CONTAINER_NAME = C_ISSUE_CONTAINER.
    ALV Grid
        IF OBJ_CUST_GRID IS INITIAL.
          CREATE OBJECT OBJ_CUST_GRID
            EXPORTING
              I_PARENT = OBJ_CUST_CONTAINER.
        ENDIF.
    Exclude Standard Functions
        PERFORM F_EXCLUDETOOLBAR USING OBJ_CUST_GRID
                              CHANGING IT_EXCLUDE.
    Layout.
        WA_LAYOUT-CWIDTH_OPT  =  C_TRUE.
        WA_LAYOUT-INFO_FNAME  =  'ROWCOLOR'.
    ALV Grid Display
        CALL METHOD OBJ_CUST_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
           IS_LAYOUT            = WA_LAYOUT
            IT_TOOLBAR_EXCLUDING = IT_EXCLUDE
            I_SAVE               = C_ALV_SAVE
          CHANGING
            IT_FIELDCATALOG      = IT_FIELDCAT[]
            IT_OUTTAB            = IT_MARA.
      ENDIF.
    Register Editable ALV Events
      CALL METHOD OBJ_CUST_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
        EXCEPTIONS
          ERROR      = 1
          OTHERS     = 2.
    *Create Object for Custom Event Handler Class if the ref. object is
    *initial.
      IF OBJ_EVENT_HANDLER IS INITIAL.
        CREATE OBJECT OBJ_EVENT_HANDLER.
      ENDIF.
    Register Events
      SET HANDLER: OBJ_EVENT_HANDLER->HANDLER_TOOLBAR       FOR
      OBJ_CUST_GRID,
                   OBJ_EVENT_HANDLER->HANDLER_USER_COMMAND  FOR
                   OBJ_CUST_GRID.
    Set Toolbar
      CALL METHOD OBJ_CUST_GRID->SET_TOOLBAR_INTERACTIVE.
    ENDFORM.                    " f_process_alv
    Form  f_excludetoolbar                                             *
    Exclude Standard Functions from ALV                                *
    U_OBJ_CUST_GRID  -->  Instant for CL_GUI_ALV_GRID                  *
    C_IT_EXCLUDE     <--  Internal table for Exclude                   *
    FORM F_EXCLUDETOOLBAR  USING  U_OBJ_CUST_GRID  TYPE REF TO CL_GUI_ALV_GRID
                        CHANGING  C_IT_EXCLUDE     TYPE UI_FUNCTIONS.
    Exclude Standard Functions
      CLEAR: C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_CHECK              TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_REFRESH            TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY           TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_COPY_ROW       TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_CUT            TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_DELETE_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_APPEND_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_INSERT_ROW     TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_MOVE_ROW       TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE          TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_PASTE_NEW_ROW  TO  C_IT_EXCLUDE.
      APPEND U_OBJ_CUST_GRID->MC_FC_LOC_UNDO           TO  C_IT_EXCLUDE.
    ENDFORM.                    " f_excludetoolbar
    Form  f_create_returnrequest                                       *
    Create Return Request based on the Work container ( ALV Grid Data) *
    FORM F_CREATE_RETURNREQUEST.
    Message to save
    ENDFORM.                    " f_create_returnrequest
    Form  f_add_mediaissue                                             *
    Create New Media Issue if the user click 'ADD ISSUE' Button.       *
    1. Get the Input From User                                         *
    2. Get Total Delivery and Return Quantity                          *
    3. Append to Final internal table                                  *
    FORM F_ADD_MEDIAISSUE .
    Local Variable Declaration.
      MESSAGE 'Add Button Clicked' TYPE 'I'.
    ENDFORM.                    " f_add_mediaissue
    Form  f_refresh_grid                                               *
    Refresh ALV Grid                                                   *
    FORM F_REFRESH_GRID .
    Refresh ALV Grid.
      IF FG_REFRESH IS NOT INITIAL.
        CALL METHOD OBJ_CUST_GRID->REFRESH_TABLE_DISPLAY.
        CLEAR: FG_REFRESH.
      ENDIF.
    ENDFORM.                    " f_refresh_grid
    Form  f_getcollectissue                                            *
    FORM F_GETCOLLECTISSUE .
    Collection Plan Data
    ENDFORM.                    " f_getcollectissue
    Form  f_perpare_final                                              *
    FORM F_PERPARE_FINAL .
    Perpare Final Internal table
    ENDFORM.                    " f_perpare_final
    Form  f_validate_data                                              *
    FORM F_VALIDATE_DATA.
    Message if any data validation.
    ENDFORM.                    " f_validate_data
    Form  f_modify_final                                               *
    Update Actual Delivery Qty and Return Qty in Final Internal table  *
    Form  f_save_data                                                  *
    Save the Data When User Click 'Save' Button                        *
    FORM F_SAVE_DATA .
    Message
      MESSAGE 'Save Button Clicked' TYPE 'I'.
    ENDFORM.                    "f_save_data
    Form  f_exitcheck                                                  *
    When User Exit from the Transaction then Raise Confirmation message*
    C_ANSWER  <--  OK or Cancel.                                       *
    FORM F_EXITCHECK  CHANGING C_ANSWER TYPE CHAR1.
    Security Check.
      C_ANSWER  =  C_CANCEL.
      CALL FUNCTION 'POPUP_TO_CONFIRM_DATA_LOSS'
        EXPORTING
          TITEL  = TEXT-039
        IMPORTING
          ANSWER = C_ANSWER.
    ENDFORM.                    "f_exitcheck
    Screen Numer : 9000
    Line:------
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_9000.
      CALL SUBSCREEN: SELECTIONSCREEN INCLUDING SY-CPROG G_SELECTION_DYNNR.
      MODULE CREATE_ALVGRID.
    PROCESS AFTER INPUT.
      MODULE EXIT_COMMAND AT EXIT-COMMAND.
      CALL SUBSCREEN: SELECTIONSCREEN.
      MODULE USER_COMMAND_9000.
    pls reward if it is useful

  • AP invoice interface - payment block field question

    Hi,
    Peoplesoft is our main system for finance. We are using SAP for logistics applications. I am building a interface to send AP invoice details from SAP to peoplesoft on a daily basis. This interface needs to pick up only those invoice that are free for payment i.e. bseg-zlspr (payment block) field is blank. For example, if an invoice is in invoice verification process, it should not be sent. Till this point, it is easy to get the details of these invoices.
    Once the invoice verification is done, bseg-zlspr field will become blank and needs to be picked up by interface. But the issue is how to select these invoices. Since the interface will run daily, I can select for invoices that are created on that day or changed on that day. But the issue, when the value of bseg-zlspr field is changed from blocked to free for payment, none of the date field value changes on either bkpf or bseg tables.
    Any ideas how to handle this???

    hi,
    use change document analysis like tcode FB04
    -> try fm CHANGEDOCUMENT_READ_HEADERS
    A.
    Message was edited by:
            Andreas Mann

  • Dunning Block field in Invoice Header

    Hello,
    There is this Dunning Block field in the invoice header tab > Accounting Data sub tab.
    Please let me know how this field value is controlled.  i.e. it gets determined or it flows from some master data?
    Any info on this dunning block field is welcome.
    Thanks,
    Shankar

    Dear Shankar
    If you implement Dunning procedure, this field will be controlled based on the value you maintain in Payer customer master Company Code Data - under Correspondence tab
    thanks
    G. Lakshmipathi

  • I receive the error: Unable to load block component C:\Program Files\Hyperception\VABINF\KeyRcv.dll

    I have two Major issues with our Infinity Project computers,
    We have one entire lab that is getting this error... "Unable to load
    block component C:\Program Files\Hyperception\VABINF\KeyRcv.dll. 
    Please verify that the component exists and any dependencies it may
    have are satisfied."  It is also producing this error with
    NumEntry.dll.  Both files exist.  I am not sure what
    dependencies these files may have.  Ideas?
    We have several systems that are giving the following error on one of
    our labs... "You have exceeded the number of block functions allowed by
    VAB for Infinity; contact Hyperception regarding upgrades."  From
    what The professor here at UTA told me when I first took on this
    project, this was a problem that we had on the previous boards and that
    someone at Hyperception was able to help us resolve this problem.
    Can you help out with these issues?  The first one I need an answer today if possible. 
    Thanks,

    We have seen this type of problem on some computers (we do not know why as of yet).The problem with missing blocks is very likely being caused by file permissions, and can be seen when non-administrators are using VAB software. To resolve this: 1. login as ADMINISTRATOR 2. run the command line script from a DOS prompt as shown below: cacls "C:\Program FIles\Hyperception\VABINF" /T /E /G Everyone:F It will scroll through the name of every file in the provided directory, and all subdirectories. This should reset every file, and allow the USER to access all files in VAB software. This should correct the problem. Regards,Steve

  • How to use same DFF for two different forms with :BLOCK.field reference

    Hi,
    Can anyone suggest how to use the same dff in two different forms by using :BLOCK.field reference.
    Scenario is the same DFF is referenced by two forms, viz. Form-1 & Form-2.
    Form-1 Reference Field is :BLOCK.field name, but the same block is not available in Form-2, which throws an error while opening it.
    Any pointers please.
    Thanks,

    In the environment I currently have access to do not have similar setup.
    Let say you setup the DFF1 default value to $HEADER.customer_name, the name of the DFF is CUSTOMER_NAME, description can be anything.
    In DFF2, default value should be a SQL, where you can reference the DFF1. For example, SELECT DECODE($FLEX.CUSTOMER_NAME, 'ABC', 1, 'DEF', 2, NULL) FROM dual
    In this case, you can reference the DFF1.

  • Payment block field disabled in FB03

    Hi Friends,
    in vendor ,payment block field in Fb03 transaction code is diabled in live and when i check the same in development it is enabled after i click on edit but the same thing is not happening in live system.
    could any one please tell how to handle this situation. where do i need to configure to make it enable.
    thanks & regards,
    kat.

    Hi,
    Check whether the field has been enabled for editing in the document changerules. The path for the same is -
    SPRO >> Financial Accounting >> Document >> Rules for Changing Documents >> Document Change Rules, line Item.
    Additionally also check the config settings for payment block whether manual payment block is activated. The path to check this is -
    SPRO >> Financial Accounting >> Accounts Receivable and Payable >> Business Transaction >> outgoing payments >> outgoing payments global settings >> payment block reasons >> define payment block reasons.
    Thanks and Regards,
    Anit

  • Payment Block Field Should be Grayed

    _*Scenario:*_
                 If one vendor line item is blocked from the MM side, due to there own conditions, that item should not released for payment until & unless the confirmation from the same side and remove the block thru MRBR.
    Issue:
                 Here, the issue is, even though it is blocked from MM, thru FB02 from FI the user can remove the block indicator and clear the item.
    Requirement of the Client:
                As, per the above issue the users (MM) don’t want the FI user, having the authority or access to change & remove the block indicator for such line items which have been blocked from MM, and unless they remove the same thru MRBR.
    Available Options:
    1.     Maintaining the User Authorizations as per the responsibilities. That means providing the FB02 authorization to higher officials only.
    2.     In the FB02, Graying out the Payment Block Field.
       So, Can it be possible to Gray out the Payment Block Field in the FB02 transaction…..
    Please give me the suggestions in this Regard…
    Thanks
    Talluri.

    Hi,
    You have to change the configuration settings for the co. code in IMG. For that follow the following steps:
    Go to IMG->Financial accounting->Account Receivable & Account Payable->Vendor Accounts->Master records->Preparations for creating Vendor Master records->Define Screenlayout per Company Code(Vendors)->Select the Co. Code row->Click Edit Field Status(on top of the screen)->Select Group, Payment transactions->Check the Payment block row field status from Req entry/Optional entry to Display entry.
    Hope it answers your question.
    Please reward points if you find this to be helpful.
    Thanks,
    Prithwiraj.

  • Payment Block field in invoice displays 'Free for payment 'even though ?

    Hi,
    We have set necessary upper tolerance limit for Price & Quantity variance in OMR6.This should block invoice for payment in case if this limit is crossed and payment block field in invoice should display "R Invoice verification".
    In our case if material is having standard price then we are getting desired results in both the cases of Quantity variance and price variance . However in case of  material with moving average price it works fine in quantity variance but not for price variance(Here invoice gets blocked for payment but payment block field displays "free for payment").What can be probable reason for this?
    Material ledger is activated in our case.
    Thanks in advance,
    Sanjog

    Hi,
    Currently, we are also facing the same problem.
    The payment term are not getting populated after posting the invoice.
    Could you please help to overcome the issue.
    Thank you.
    Warm Regards,
    Kalyani

  • How can I block a particular program and not the whole channel?

    I want to block a particular program. When I am trying to that, it blocks whole channel. How can I do that?
    Second Q is: can I have two parental control pins to block programs?

    Then there is no point to use it for me. Some channels require parental control for some programs, so this option should be available.Someone can argue that then "why don't you lock whole channel and unlock whenever you want to use it." I want to avoid locking-unlocking by locking specific programs.
    Comcast has this option of locking specific program as well locking channel!

  • Log. Block field in BPM detail report

    What does the M or A mean in the Log. Block field in the BPM detail report for monitoring object "Blocked Invoice for Payment"?

    In your SQL:
    SELECT ename, job, your_function(sal, comm) your_calculation
       FROM empDenes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Req Help to Update LIKP-LIFSK,Delivery Header block through custom program.

    Hi everyone,
    Can you please suggest a FM or BAPI to update the delivery header block field, LIFSK, in LIKP table through FM or a BAPI.
    I tried using 'BAPI_OUTB_DELIVERY_CHANGE' as below to update the LIKP-LIFSK, but it is not working.
    DATA : ls_likp TYPE likpvb,
           ls_dlv_header  TYPE bapiobdlvhdrchg,
           lt_dlv_items_control TYPE STANDARD TABLE OF bapiobdlvitemctrlchg,
           ls_dlv_item_control TYPE bapiobdlvitemctrlchg.
    DATA : ls_dlv_hdr_control   TYPE bapiobdlvhdrctrlchg,
           ls_dlv_techn_control TYPE bapidlvcontrol,
           lt_bapireturn TYPE STANDARD TABLE OF bapiret2,
           ls_bapireturn TYPE bapiret2,
           lt_bapiext2 TYPE STANDARD TABLE OF bapiext,
           ls_bapiext2 TYPE bapiext.
    DATA :  BEGIN OF ls_mns_of_del,
                 vbeln TYPE likp-vbeln,     "delivery number
                 lifsk TYPE likp-lifsk,     "means of transport
           END OF ls_mns_of_del.
    CONSTANTS : lc_del_blck           TYPE bapiext-param VALUE 'LIKP-LIFSK'.
    PARAMETERS : p_dlv TYPE likp-vbeln OBLIGATORY."  OBLIGATORY.
    SELECT SINGLE *
      FROM likp
      INTO ls_likp
      WHERE vbeln = p_dlv.
    CHECK sy-subrc = 0.
    CLEAR : ls_bapiext2.
    ls_mns_of_del-vbeln = ls_likp-vbeln.
    ls_mns_of_del-lifsk = 'BX'.
    ls_bapiext2-param = lc_del_blck .
    ls_bapiext2-value = ls_mns_of_del.
    APPEND ls_bapiext2 TO lt_bapiext2.
    CALL FUNCTION 'MAP2E_LIKPVB_TO_BAPIOBDLVHDRCH'
      EXPORTING
        likpvb          = ls_likp
      CHANGING
        bapiobdlvhdrchg = ls_dlv_header.
    CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
      EXPORTING
        header_data           = ls_dlv_header
        header_control        = ls_dlv_hdr_control
        delivery              = ls_likp-vbeln
        techn_control         = ls_dlv_techn_control
      TABLES
        extension2            = lt_bapiext2[]
        return                = lt_bapireturn[]
      EXCEPTIONS
        communication_failure = 1
        system_failure        = 2
        OTHERS                = 3.
    IF lt_bapireturn[] IS INITIAL.
      COMMIT WORK AND WAIT.
      MESSAGE 'Success' TYPE 'I' DISPLAY LIKE 'S'.
      LEAVE LIST-PROCESSING.
    ELSE.
      MESSAGE 'Error' TYPE 'I' DISPLAY LIKE 'E'.
      LEAVE LIST-PROCESSING.
    ENDIF.

    Hi ,
    After seeing your code, you are not passing any parameters to header control data. once check the below code, it might useful.
    DATA: h_data like bapiobdlvhdrchg,
             h_control like bapiobdlvhdrctrlchg,
            delivery like bapiobdlvhdrchg-deliv_numb,
            item_data like bapiobdlvitemchg occurs 0 with header line,
            item_control like bapiobdlvitemctrlchg occurs 0 with header line,
             return like bapiret2 occurs 0 with header line.
            CLEAR: h_data, h_control, delivery, item_data, item_control,
                   return.
            REFRESH: item_data, item_control, return.
           h_data-deliv_numb = gst_alv_table-c6_vbeln.
           h_data-dlv_block  = p_new_del_blck.         "the new delivery block
           h_control-deliv_numb = gst_alv_table-c6_vbeln.
           h_control-dlv_block_flg = 'X'.
           delivery = gst_alv_table-c6_vbeln.
              CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
                  EXPORTING
               header_data                   = h_data
             header_control                = h_control
              delivery                      = delivery
               TABLES
                return                        = return .
             "Check if return table got an error.
             READ TABLE return WITH KEY type = 'E'.
                IF NOT sy-subrc IS INITIAL.
               CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                   EXPORTING
                  wait = 'X'.
                 ELSE.
             ROLLBACK WORK.
                            ENDIF.
    Regards,
    Parupelly

Maybe you are looking for

  • I am getting error like "nca_connect_server: cannot communucate to host "

    I am getting error like "nca_connect_server: cannot communucate to host " while replaying my script through Loadrunner 9.1 virtual User Script started Starting action vuser_init. vuser_init.c(12): nca_set_connect_opt("SCALE_INFO") vuser_init.c(16): E

  • Is there any way to retrive the data from my USB Key

    Hello, I have a usb key I have been using on a Win 7 desktop computer and a Mac Book Air to put in Data on a spread sheet. I interchange to put in the data between the computer and my MBA without any problem. I am today not able to open the usb memor

  • Can a menu link to .html pages?

    I want to make a DVD that will start with a video introduction, and upon finishing the brief minute or so intro, it will display a menu screen. 1.) I would like the menu buttons to link to .html pages saved on the DVD. So after clicking on a link fro

  • Opening Google Map with PDA GPRS in LabVIEW

    Hi, I would like to open Google Map in Internet Explorer of my PDA(connectivity through GPRS). The required URL example is http://maps.google.co.in/?ie=UTF8&ll=13.277373,77.623901&spn=1.83638,3.161316&z=9. Please let me know if any of you can provide

  • Formula node parenthesis problems

    Hi Y'all,    I'm going cross-eyed trying to figure out what is wrong with the equation that I'm trying to use in a formula node. I've attached both the VI (version LabVIEW 2009) and the error msg. Unfortunately there are a couple more of these, but m