How to set Callback Status in ALV OO

Hi All,
I need to find the method or object to use to set the callback status to my program so I may use forms that I have developed.
How do i do that?
thanks
KW
TRY.
        CALL METHOD cl_salv_table=>factory
          IMPORTING
            r_salv_table = gr_alv
          CHANGING
            t_table      = gt_dev_task_display.
        PERFORM f_display_settings.
        gr_alv->set_screen_status(
        pfstatus = 'ZALV_STANDARD_KW'
        report = sy-repid
        set_functions = gr_alv->c_functions_all ). "set all basic ALV funtions
        gr_events = gr_alv->get_event( ).
**... optimize the column widths
        TRY.
            lr_columns = gr_alv->get_columns( ).
            lr_columns->set_optimize( 'X' ).
          CATCH cx_salv_not_found.                      "#EC NO_HANDLER
        ENDTRY.
*   get layout object
        lo_layout = gr_alv->get_layout( ).
*   set Layout save restriction
*   1. Set Layout Key .. Unique key identifies the Differenet ALVs
        ls_key-report = sy-repid.
        lo_layout->set_key( ls_key ).
*   2. Remove Save layout the restriction.
        lo_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
        lo_layout->set_default( abap_true ).
        gr_functions = gr_alv->get_functions( ).
        gr_functions->set_all('X').
        gr_functions->set_group_filter( value = if_salv_c_bool_sap=>false ).
        gr_alv->get_display_settings( ).
        gr_alv->display( ).
      CATCH cx_salv_msg.
        MESSAGE 'ALV Display Not possible'(w02) TYPE 'I' DISPLAY LIKE 'E'.
    ENDTRY.

Namish,
thank you for the reply.
I have created the handle class but the issue I am having is in the PAI becuase the callback status is not set it keep going back to the SAPLSVC_FULLSCREEN pai and not to the PAI that I would like.
What I am trying to achieve can be done with this code:
* call list viever
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_user_command  = gc_user_command
      i_callback_pf_status_set = gc_pf_status
      I_BYPASSING_BUFFER       = 'X'
      i_background_id          = 'ALV_BACKGROUND'
      i_callback_program       = gv_repid
      i_default                = 'N'           "use gs_variant
      it_event_exit            = gt_event_exit
      it_fieldcat              = gt_fieldcat
      is_layout                = gs_layout
      i_save                   = gv_save
      is_variant               = gs_variant
      it_special_groups        = gt_special_groups
    TABLES
*      t_outtab                 = gt_report_list.
      t_outtab                 = gt_report_list2.
the variable gc_user_command will bring it back to my calling program USER_COMMAND, this is what I am trying to achieve in OO
Thank you!

Similar Messages

  • In Standard Report Of ALV How Can Set PF Status.

    In Standard Report Of ALV How Can Set PF Status.
    Thanking in anticipation.

    in the call function module, you pass the PF status parameter.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = pgm
       <i> <u>  i_callback_pf_status_set = 'SET_PF_STATUS'</u></i>
          it_fieldcat              = fieldcat
          is_variant               = disvariant
          is_layout                = layout
          is_print                 = print
          i_save                   = 'A'
          it_events                = eventcat
          it_sort                  = sortcat
          i_callback_user_command  = 'USER_COMMAND'
        TABLES
          t_outtab                 = a_output
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    ENDFORM.                    "LIST_DISPLAY
    FORM SET_PF_STATUS *
    FORM set_pf_status USING extab TYPE slis_t_extab.
      SET PF-STATUS 'ZZSTD'.
    ENDFORM.                    "set_pf_status
    Here double Click on ZZSTD. IT will take you to a different screen and you have to set it.
    Ster.

  • How to set the status for a customer plan to RELEASED.

    Hello all,
    I created a program for mass creation of customer plans. But after the creation of a plan, the status should be set to released, so that the user can go about creating the trade promotions for the customer plan. Can anybody tell me how to set the status of a customer plan to RELEASED.
    Thanks,
    Disha.

    Hi Clemens,
    I am not talking about doing it in the CRM_UI transaction..I created a program..which would create the customer plans based on the planning account data provided. I was succesfull in creating the plans, but I am not knowing how to release it, if only anybody can tell me about a Function module or method, which can help me do this, that would be great
    Thanks,
    Disha.

  • How to set 'error' status with DB poll Adapter in OSB

    1. Configured DB Adapter to poll rows with status 'notprocessed' and set the status to 'processed'
    2. Configured FTP Adapter to write fetched rows from DB into a CSV file
    Now my requirement is if any error like FTP server is not available, how to set the status in DB table to 'error'

    Yes Vlad you are right, this will avoid another DB connection created in Error Handler.
    I hope this will provide some lights on the usefulness of "Transaction"
    http://www.nysolutionsltd.com/transaction-handling-in-oracle-service-bus/
    http://kd-blog-tech.blogspot.com.au/2010/12/transaction-management-for-osb-service.html
    Regards
    RK
    Edited by: RK.. on 27/03/2013 17:10

  • How to Set User Status of Sales Order at item level.

    How to Set User Status of Sales Order at item level by default to 'Purchase Req Not Created' (example)while creating order. Please tell EXIT Name to be triggered & Internal table to be populated.
    Thanx,
    Srini
    Moderator message: please do your own research before asking.
    Edited by: Thomas Zloch on Feb 21, 2011 11:19 AM

    Mathew,
    Here is a document that should help you get started on enhancing 2LIS_11*
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c09d5356-d8c4-2d10-8b84-d24723fc1f0a?QuickLink=index&overridelayout=true
    Good luck!

  • Can anyone tell me how to use GUI status in ALV report.

    Can anyone tell me how to use GUI status in ALV report. I want to use  buttons in ALV report.

    Juheb,
    see the link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    Adding a button on the ALV grid using OOPs
    check these sites.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproABAP-ALVControllingStandard+Buttons&
    chk this.
    alv-pfstatus:
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_pfstatus.htm
    then how to capture that button click.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm
    REPORT ZTESTALV.
    TYPE-POOLS: SLIS.
    *- Fieldcatalog
    DATA: IT_FIELDCAT  TYPE LVC_T_FCAT,
          IT_FIELDCAT1  TYPE SLIS_T_FIELDCAT_ALV..
    *- For Events
    DATA:IT_EVENTS TYPE SLIS_T_EVENT.
    DATA:  X_FIELDCAT  TYPE LVC_S_FCAT,
            X_FIELDCAT1  TYPE SLIS_FIELDCAT_ALV.
    DATA:X_LAYOUT TYPE LVC_S_LAYO.
    "{ FOR DISABLE
    DATA: LS_EDIT TYPE LVC_S_STYL,
          LT_EDIT TYPE LVC_T_STYL.
    "} FOR DISABLE
    DATA: BEGIN OF IT_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
       <b>   BUTTON(10),</b>
         END OF IT_VBAP.
    DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
    SELECT VBELN
           POSNR
           UP TO 10 ROWS
          INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
          FROM VBAP.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    <b>X_FIELDCAT-SELTEXT = 'Button'.
    x_fieldcat-fieldname = 'BUTTON'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-OUTPUTLEN = '10'.
    X_FIELDCAT-style = X_FIELDCAT-style bit-xor
                      cl_gui_alv_grid=>MC_STYLE_BUTTON bit-xor
                      cl_gui_alv_grid=>MC_STYLE_ENABLEd.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.</b>
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'VBELN'.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '10'.
    x_fieldcat-ref_field = 'VBELN'.
    x_fieldcat-ref_table = 'VBAK'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'POSNR'.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '5'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    "{FOR DISABLE HERE 6ROW IS DISABLED
    SY-TABIX = 6.
    LS_EDIT-FIELDNAME = 'VBELN'.
    LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    LS_EDIT-STYLE2 = SPACE.
    LS_EDIT-STYLE3 = SPACE.
    LS_EDIT-STYLE4 = SPACE.
    LS_EDIT-MAXLEN = 10.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    *LS_EDIT-FIELDNAME = 'POSNR'.
    *LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    *LS_EDIT-STYLE2 = SPACE.
    *LS_EDIT-STYLE3 = SPACE.
    *LS_EDIT-STYLE4 = SPACE.
    *LS_EDIT-MAXLEN = 6.
    *INSERT LS_EDIT INTO TABLE LT_EDIT.
    INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
    MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB  TRANSPORTING
                                      HANDLE_STYLE .
    X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
    "} UP TO HERE
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        I_CALLBACK_PROGRAM = SY-REPID
        IS_LAYOUT_LVC      = X_LAYOUT
        IT_FIELDCAT_LVC    = IT_FIELDCAT
      TABLES
        T_OUTTAB           = IT_VBAP[]
      EXCEPTIONS
        PROGRAM_ERROR      = 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.
    Don't forget to reward if useful....

  • How to set custmer master block for posting & how to set the status .....

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. Use an appropriate subject in your message thread. >
    Hi ...
    How to set custmer master blocked for posting & how to set the status has deleted. please provide the steps for the above two actions.
    thanks

    Hi,
    U can use T-code FD05 for Blocking the customer and
    T-code FD06 in order to set for deletion,
    Assign Points if useful,
    Regards,

  • How to set the Status

    Hi
    How to set the status of  user defined form as "closed" . I have one form, i want that form should not be editable after one condition is true. Can anyone tell one solution
    Advance Thanks
    jintu

    Hiii,
    Use this
    Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
            Try
                Select Case BusinessObjectInfo.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD, SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE
                        If BusinessObjectInfo.BeforeAction = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                        ElseIf BusinessObjectInfo.ActionSuccess = True Then
                            If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE Then
                            End If
                        End If
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
                        If BusinessObjectInfo.ActionSuccess = True Then
                            objForm = objMain.objApplication.Forms.Item(BusinessObjectInfo.FormUID)
                            objForm.Freeze(True)
                            If (objForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE) Then
                               if objForm.Item.Items("Status").Value.equals("Closed")= True
                             objForm.Mode = SAPbouiCOM.BoFormMode.fm_VIEW_MODE
                             End If
                              end if              
                        End If
                End Select
            Catch ex As Exception
                objMain.objApplication.StatusBar.SetText(ex.Message)
            End Try
        End Sub

  • Set pf status in alv oops concept

    Hi all,
    can any one pls tell me  by using which method or class  i can set the
    pf status......?  
    regards
    cnu

    Fast and Easy way
    As you are using OO ALV, remove any function not needed from the ALV via parameter IT_TOOLBAR_EXCLUDING of method set_table_for_first_display and put your own function in the menu of your dynpro PBO via SET PF-STATUS.
    Nethertheless you can use a more complew way using :
    <b>Changing Standard Functions</b>
    Purpose
    The standard functions are not designed for specific applications. As a result, special knowledge of the data displayed cannot be considered. In individual cases, you may design a standard function - such as sorting by a specific column - more effectively in a specific application.
    Process Flow
    1. Define an event handler method for event before_user_command [Page 108]. This event is triggered after the user has selected a function. This means that the ALV Grid Control passes control to the application before the function is executed. Using event parameter I_UCOMM you can restrict the function code to the function you want to modify.
    2. Implement your own algorithm for the function within the event handler method. In this context, you can call methods of the ALV Grid Control.
    3. Reset the function code to ensure that the standard function is no longer executed:
    CALL METHOD <Instance of the ALV Ccntrol>->set_user_command exporting I_UCOMM = SPACE.
    If you never need specific functions of the tool bar, you can hide them for the entire life-cycle of the control. To do this, you use parameter IT_TOOLBAR_EXCLUDING of method set_table_for_first_display  to pass a table that contains the function codes to be hidden.
    <b>Defining GUI Elements in the Toolbar</b>
    Process Flow
    1. Define an event handler method for event TOOLBAR.
    2. Declare a structure for defining a toolbar element:
    data: ls_toolbar TYPE stb_button.
    3. For a pushbutton, for example, you would fill the following fields:
    CLEAR ls_toolbar. MOVE 0 TO ls_toolbar-butn_type.
    MOVE 'BOOKINGS' TO ls_toolbar-function.
    MOVE icon_employee TO ls_toolbar-icon.
    MOVE 'Show Bookings'(111) TO ls_toolbar-quickinfo. MOVE SPACE TO ls_toolbar-disabled.
    In the butn_type field, you specify the type of the GUI element for the ALV Grid Control. For possible values, see the value range of domain TB_BTYPE.
    4. Use event parameter E_OBJECT to append the new definition to table mt_toolbar:
    APPEND ls_toolbar TO e_object->mt_toolbar.
    5. If you want to define additional elements, go back to step 3.
    6. Call method set_toolbar_interactive, if you want to rebuild the toolbar.
    Result
    In the event handler method of event USER_COMMAND, you can query the function code you specified in field function to implement the associated function.
    See also report BCALV_GRID_05 in development class SLIS.
    Look at this documentation too : <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf">ALV Gird Control (BC-SRV-ALV)</a>
    Regards

  • How to set window.status when returning to a page with back button/list?

    It is easy enough to set window.status to application-oriented information when loading a page: do it in a function which is the onload handler for the page's body element. But, when returning to this window from another window with the second window's back button, or selecting the first window from the second window's back list, window.status gets set to browser-oriented information, usually the string "Done". Is there any means by which I can set window.status to application-oriented information when returning to the window via another window's back button/list? What would be really great is if there is an event handler like this:
    window.onreturnviaback = onreturn_via_backhandler;
    Any ideas?

    How about:
    - (void)viewWillAppear:(BOOL)animated
    I use that a lot.

  • Resolved:how to set default LAYOUT for ALV list display

    hey guys,
      In my alv report there are 20 cloumns.
    after display i usualy choose 12 of them from CHOOSE LAYOUT option and then give it to print...
    how to set this LAYOUT as default
    sorry guys i figured it out..
    but can we give it programiticlay?
    Edited by: kumar gaurav on May 27, 2008 8:15 AM

    hi,
    you can do it.
    after declaring the catlog table you will give as
    wa_catlog-seltext_l = 'material'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 18.
    wa_catlog-fieldname = 'matnr'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    wa_catlog-seltext_l = 'plantl'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 4.
    wa_catlog-fieldname = 'werks'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    similarly what sequence you give here i.e. material  ,  plant  etc. you get the output in the same oder you can even give only the fields you want in the output.
    rewards points if useful.
    siri

  • How to set the status when Idoc fails

    Hai ,
    I created Idoc extension & created a segment under that(Delivery related).
    My requirement is,
    if certain data not found,
    Idoc should fail with text"Shipemnt for delivery <del. No> not found.
    Could you please help me how to do this?
    I checked the table EDIDC table but the above mentioned status is  not there.
    Thanks & Best Regards,
    Bhaskar.

    you need to set the status using IDOC_STATUS
    where ever error occurs populate the status table.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
       IDOC_STATUS-STATUS = '51' ." if it is inbound
       IDOC_STATUS-MSGTY  = Message-type.
       IDOC_STATUS-MSGID  = message-id.
       IDOC_STATUS-MSGNO  = message-MSGNR.
       IDOC_STATUS-MSGV1  = message-MSGV1.
       IDOC_STATUS-MSGV2  = message-MSGV2.
       IDOC_STATUS-MSGV3  = message-MSGV3.
       IDOC_STATUS-MSGV4  = message-MSGV4.
    *  IDOC_STATUS-SEGNUM = ?????????????????
    *  IDOC_STATUS-SEGFLD = ?????????????????
    *  IDOC_STATUS-UNAME  = ?????????????????
       IDOC_STATUS-REPID  = SY-REPID
    *  IDOC_STATUS-ROUTID = ?????????????????
       APPEND IDOC_STATUS.

  • How to set summable field in ALV

    Dear ABAPers,
    I find report that use ALV to show the output. Using my id the field with number type is summable (using ALV sum functionality) but using other id, it can't. Does anyone know how to set this functionality? I read several posting that this one is achieveable by setting up t_field_cat-do_sum = 'X'. But with this set up, it shouldn't have difference when I run by my id and other. I suppose there is something in ALV setting that need to be configured. Please let me know if there are any idea about this issue.
    Thanks a lot.
    Regards
    Hadi

    Hi Karthik,
    We don't set user specific layout. I am afraid there is some authorization code set in the program and it determine ALV activities on different user. Are there possibility of it in ALV?
    However thanks alot for your suggestion.
    Regards
    Hadi

  • How to set completion status

    Hello,
    I have a course built in Captivate 3 that automatically moves to completed within our LMS when users open it. How can I set the status to not change until users have gone through the entire course? Any ideas?
    Thanks!

    Hi Shannon,
    In our LMS this occurs if I add the SWF as a Flash file when I upload to the LMS. However, if I enable reporting on the Quiz Preferences pages in the Captivate file before publishing and then import it as a SCORM package in the LMS it uses the LMS customization settings on the Quiz Preferences page to track and set a completion status.

  • How to set workflow status when workflow manually cancelled?

    Hi All,
    When i manually cancelled designer workflow, then status comes as 'cancelled'. Instead i need to set different status. How to  achieve this? 
    Thanks in advance!

    You can use this action
    Set Workflow Status
    This action is initially displayed in a workflow step as Set workflow status to Canceled. Use this action to set the status of the workflow. The default options are Canceled, Approved, and Rejected.
    You can enter a new status value in the dropdown in the action. Once you enter a status value, the entry is automatically added to the dropdown list. For example, you can enter a status that is more user-friendly and informative than Completed or Canceled,
    such as Expense Report Approved.
     NOTES 
    You cannot rename or delete a status value once it has been created. However, you do not have to use it.
    A custom status is applicable to the current workflow only, and cannot be used in another workflow.
    A workflow cannot use custom status values that you define in the action if the action is used inside an impersonation step.
    If the Set Workflow Status action is the last step in your workflow where you have also used a custom value, you can see your custom value in the Status column in
    the list upon workflow pausing or completion.
    Following is an example of what the action might look like in a workflow step,
    Set workflow status to Specification status: Ready for Design Review
    http://office.microsoft.com/en-in/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

Maybe you are looking for

  • Invoice and Credit note posting not matching

    Hi All, An invoice was issued with two items so the credit note in reference to that invoice (to reverse the invoice) has been issued item wise. The problem is that the amount of credit note and the invoice is not matching so the posting does not cle

  • How to know the Column name which contains some value?

    Suppose if a table contains 30 columns, and I want to know the name of the Column that contains my search text(Value). For Eg. I have a Table named Allowances contains 20 columns for referencing 20 types of allowances. The columns are named like Allw

  • CD burner not recognized?

    I just burned three CDs. Now, it's saying "disc burner or software not found." I ran the diagnostic and it says, "Microsoft Windows XP Home Edition Service Pack 2 (Build 2600) Gateway Gateway M320 and 4500 Series iTunes 7.0.0.70 CD Driver 2.0.6.0 CD

  • BTE for Payment Proposal

    Good Day Experts, I have a requirement from my client. It is to have an extra data populated in payment proposal for payment review process. I offered to identify a field (Example: Reference 2) for populating the data in Payment Proposal. For the exa

  • Can't use free download Reader

    Reader xi dissappeared from our computer a year ago somehow. We tried to load the free Reader, but it takes over the icons on our desktop and we can't access any of these programs. The Reader program that came with our computer didn't do that. Whats