Skip to Content
author's profile photo Former Member
Former Member

How to save a result, shown in an editable-ALV, for future use?

Hi,

I'm facing a chalenge with a customer who wants to get a result set from selection shown, to modify some fields of the result, and to be able to save the "corrected" result for future visualisation.

Is it possible at all? What I imagine was to give him a possibility to manipulate the result in an editable ALV grid, but I have no idea is it possible to save the result for future usage, and, if yes, how could he catch this "saved" result next time he need it?

Any ideas in this direction would be highly appreciated - and even more in case of any little snip of sample-code provided 😉

Many thanks in advance.

Regards,

Ivaylo Mutafchiev

SAP BC/ABAP Consultant

VBS - Varna

BG

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2006 at 12:26 PM

    Hi,

    It possible. Make the field as editable and do the changes and u can update. 'FORM USER_COMMAND ' is a dynamic form

    Check the highlighted code

    ----


    • C O N S T A N T S *

    ----


    CONSTANTS : C_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND',

    &----


    *& Form DISPLAY_ALV

    &----


    • ALV grid display

    ----


    FORM DISPLAY_ALV .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-REPID

    IT_EVENTS = IT_EVENT1

    <b> I_CALLBACK_USER_COMMAND = C_USER_COMMAND</b>

    IT_FIELDCAT = IT_FIELDCAT

    TABLES

    T_OUTTAB = IT_FINAL

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    ENDFORM. " DISPLAY_ALV

    &----


    *& Form user_command

    &----


    • EXIT routine for user_command

    ----


    • -->R_UCOMM Checks for sy-ucomm for &IC1

    • -->RS_SELFIELD structure to store selected row

    ----


    <b>FORM USER_COMMAND USING IV_UCOMM TYPE SY-UCOMM

    IV_SELFIELD TYPE SLIS_SELFIELD. "#EC CALLED</b>

    DATA REF1 TYPE REF TO CL_GUI_ALV_GRID.

    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

    IMPORTING

    E_GRID = REF1.

    CALL METHOD REF1->CHECK_CHANGED_DATA.

    CASE IV_UCOMM.

    WHEN '&DATA_SAVE'.

    WHEN OTHERS.

    ENDCASE.

    ENDFORM. "user_command

    Thank you,

    Ramu N.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      thanks, but that was not what I was looking for. I now how to get the "fixed" result from the screen back to the program. To clarify, I don't use 'REUSE_ALV_GRID_DISPLAY', but call a screen with custom container where in its PBO I instanciated a class "cl_gui_alv_grid" and pass to its inscance result-set from the database using method:

      CALL METHOD grid->set_table_for_first_display.

      After that I handled user-response using localy defined event-handler.

      I have been told there is a way to save the "fixed" internal table in some kind of version within SAP environment, but not at presentation server. Further the user is allowed to retrieve result from standard selection or from previously saved "version". That's what I'm looking for.

      Thanks again.

      Regards,

      Ivaylo

      Message was edited by: Ivaylo Mutafchiev

  • Posted on Oct 26, 2006 at 12:27 PM

    Hi,

    As long as he gives the same inputs in the selection screen he would get the same results(Unless the data base data gets changed through some other transaction).

    May be he wants a local copy of the report output(Something like export to excel or text file ) which is already available as an option in the alv reports.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I think i I mentioned that the customer needs to "fix" the result (shown for example in an ALV) and just after that to save it. So next time he start the program with the same paramethers at selection screen he will obtain "non-fixed" result and will need to fix it again.

      Regards,

      Ivaylo

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.