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

How to capture values dynamically from output screen

Hi all,

I have a new requirement.

i developed a report which is showing output correctly. Here i have to take a check box for every record in output screen. if i check some of the check boxs then it should allow for further processing.

i succeeded upto put checkboxes on output screen.

but i don't know how to capture the values of checkboxes of every record into an internal table. it is necessary to capture into an internal table

will it be work by using LOOP AT SCREEN statement.

could you please explain with examples. it is normal report program only.

i would appreciate an early reply

Regards

Prabhakar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 21, 2006 at 09:14 AM

    use the fn module

    DYNP_VALUES_READ

    which is used to read the values on the screen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 21, 2006 at 09:17 AM

    HI,

    I think FM : DYNP_VALUES_READ can be used.

    Regds,

    Akshay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 21, 2006 at 09:23 AM

    Hi

    You can output your records in table control (or may be alv grid)and add one additional field of type c for check box and then you can process your records according to the selections made

    I hope I am getting you

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 21, 2006 at 09:29 AM

    Sample code for usage:

    • Internal table for Region and its Description

    data: begin of t_t005u occurs 0,

    LAND1 like t005u-land1,

    BLAND like t005u-bland,

    Bezei like t005u-bezei,

    end of t_t005u.

    • Ranges for Country

    ranges: r_land1 for t005u-land1.

    • Get the country codes and their descriptions

    refresh r_land1.

    clear r_land1.

    refresh t_dynpfields.

    move 'V_LAND1' to t_dynpfields-fieldname.

    append t_dynpfields.

    clear t_dynpfields.

    • Read the value in the Country field on the screen

    call function 'DYNP_VALUES_READ'

    EXPORTING

    dyname = 'SAPLZ_VENDOR_MASTER'

    dynumb = '0004'

    translate_to_upper = 'X'

    TABLES

    dynpfields = t_dynpfields

    EXCEPTIONS

    invalid_abapworkarea = 01

    invalid_dynprofield = 02

    invalid_dynproname = 03

    invalid_dynpronummer = 04

    invalid_request = 05

    no_fielddescription = 06

    undefind_error = 07.

    read table t_dynpfields with key fieldname = 'V_LAND1'.

    if not t_dynpfields-FIELDVALUE is initial.

    r_land1-low = t_dynpfields-FIELDVALUE.

    r_land1-sign = 'I'.

    r_land1-option = 'EQ'.

    append r_land1.

    clear r_land1.

    endif.

    • Get the Regions to be displayed as F4 Help

    select land1

    bland

    bezei

    from t005u

    into table t_t005u

    where spras = 'EN'

    and land1 in r_land1.

    if not t_t005u[] is initial..

    • Popup to display Valid Regions for the selected country

    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

    EXPORTING

    ENDPOS_COL = 60

    ENDPOS_ROW = 40

    STARTPOS_COL = 40

    STARTPOS_ROW = 20

    TITLETEXT = 'Region'

    IMPORTING

    CHOISE = v_choice

    TABLES

    VALUETAB = t_t005u

    EXCEPTIONS

    BREAK_OFF = 1

    OTHERS = 2.

    if sy-subrc = 0.

    if v_activity = 'V'.

    read table t_t005u index v_choice.

    if sy-subrc = 0.

    v_regio = t_t005u-bland.

    move 'V_BEZEI' to t_dynpfields-fieldname.

    move t_t005u-bezei to t_dynpfields-fieldvalue.

    append t_dynpfields.

    • Update the Region description on the screen.

    call function 'DYNP_VALUES_UPDATE'

    EXPORTING

    dyname = 'SAPLZ_VENDOR_MASTER'

    dynumb = '0004'

    TABLES

    dynpfields = t_dynpfields

    EXCEPTIONS

    invalid_abapworkarea = 01

    invalid_dynprofield = 02

    invalid_dynproname = 03

    invalid_dynpronummer = 04

    invalid_request = 05

    no_fielddescription = 06

    undefind_error = 07.

    endif.

    endif.

    endif.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 20, 2007 at 07:45 PM

    I do have same requirement, I am using Read command and able to process the selected records. But my requirement is when I click Back it goes to the basic list and now the list should display without the previous selected records.

    Could some one tell me how to make this possible.

    Witing for your reply.

    Add a comment
    10|10000 characters needed characters exceeded

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.