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

dialog programming

hi ,

i m new in dialog programming please help me to sort out this issue

my requirement is :

i have one z table that have 2 fields client and type.

client is single. tyep have 25 character.

on 100 screen we have only type input field and that is single input output field.

that shoud b inactive initially on screen. when i press the drop down button then it will show the entry in database table when i will press a button new then this field should b active and we can put the entry and when press the save button then save in database.

please give me solution in details

thanks in advance

points will b sure*

regards

vijay

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2007 at 04:47 AM

    Hi Vijay,

    1) to get your type field to give a list of database values when you hit the dropdown, define it in the data dictionary with a foreign key of the table containing the value list.

    2) To get your field to be display only initially, and then open for input after the pushbutton is pressed you need to do a couple of things. In the PBO you need a module to conditionally set the attributes of the field. In the PAI you need a user command module to set the attribute when the pushbutton is pressed.

    define a global field: V_OPEN_TYPE(1) type c. "space = off, X = on

    in the layout, for your field 'type', put a value in one of the groups eg in Group1 put '001'.

    in the menu painter, give your pushbutton a fcode eg 'NEW'. You also need a save button with a fcode eg 'SAVE'.

    then in the PBO have a module SET_SCREEN_100.

    module set_screen_100.

    if v_open_type = space.

    loop at screen.

    check screen-group1 = '001'.

    screen-input = '0'.

    modify screen.

    endloop.

    else.

    loop at screen.

    check screen-group1 = '001'.

    screen-input = '1'.

    modify screen.

    endloop.

    endif.

    endmodule.

    In the pai you need a user command module

    MODULE USER_COMMAND_100.

    CASE SY-UCOMM.

    WHEN 'NEW'.

    V_OPEN_TYPE = 'X'.

    WHEN 'SAVE'.

    update table set field type = type. "modify this statement as appropriate for your table and field definitions.

    ENDCASE.

    ENDMODULE.

    I'd also set it up such that the save icon was only active once the NEW button was pressed. You can do this in the PBO where you set the pf-status by excluding the ucomm conditionally.

    module set_status_100.

    data: i_ucomm like sy-ucomm occurs 0 with header line.

    clear i_ucomm[].

    if v_open_type = space.

    APPEND 'SAVE' TO i_ucomm.

    endif.

    set pf-status 'STATUS' excluding i_ucomm.

    endmodule

    Your flow logic should then look something like this:

    PBO

    MODULE SET_STatus_100.

    module set_screen_100.

    PAI

    module user_command_100.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2007 at 04:52 AM

    Hi Vijay,

    while giving i/o field in Dialog Programming, check that input not required field.

    Thn while declaring that input field in the ABAP Editor assign some MODIF ID for that.Thn while writing PAI,U write the code for changing the screen display.

    Hope it Helps.

    Regards,

    Padmam.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 27, 2007 at 04:57 AM

    Hi,

    First of all , in the PBO event of your sceen, perform following thing.

    if sy-ucomm ne 'NEW'. (Where NEW is the fcode you have assigned to your pushbutton)

    loop at screen.

    if screen-name = '<name.>'.

    screen-active = 0. (or 1. just check the value to deactivate the field. i cant remember).

    modify screen.

    endif.

    This will show the field in inactive mode initially.

    And in the PAI event,

    case sy-ucomm.

    when 'NEW'.

    do nothing (the field will be automatically in editable mode)

    when 'SAVE'. (you need to activate this through PF status).

    update the database.

    endcase.

    Make sure your field is in both input / output mode when you design your screen. Assign F4 help to your field so that you are able to see the database value even in the inactive mode.

    I hope this helps.

    Revert if you want still detailed explanation clearly stating what is missing.

    Pls reward points if helpful

    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.