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

dialog programming doubt

Hi folks,

My requirement is to create a custom transaction with save , change and delete buttons. I have created the screen but I am stuck in the flow logic. the following is my flow logic.

data : wa_data type zlandr.

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


MODULE USER_COMMAND_1000 INPUT.

case sy-ucomm.

when 'DABA'.

mara-matnr = mara-matnr.

endcase.

ENDMODULE. " USER_COMMAND_1000 INPUT

&----


*& Module STATUS_1000 OUTPUT

&----


  • text

----


MODULE STATUS_1000 OUTPUT.

SET PF-STATUS 'STATUS'.

ENDMODULE. " STATUS_1000 OUTPUT

but I am unable to generate screen its saying invalid field format.

Could somebody send me a sample code as I am new to this area.

Thanks

Rock

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 02:52 AM

    Hi,

    Check the Screen fields and Field attributes on the screen.you might be missing some thing.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 03:06 AM

    Hi,

    Check whether you have given correct screen field and table field. Also check whether you have assigned ok_code.

    if still you could not find the mistake, send in your full coding.

    Regards,

    Sakthi.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Yes I checked everythig i created 3 buttons for create , change , display. when I click on create its not going to PAI at all . I have created function codes for all of them in the screen painter . I am pasting you the complete code .i am unable to identify the error.

      &----


      *& Report ZRE_MAINTENANCE

      *&

      &----


      *&

      *&

      &----


      REPORT ZRE_MAINTENANCE.

      data : wa_data type zlandr,

      it_data type standard table of zlandr,

      ok_code(4).

      tables : zlandr,vibdpr.

      data : bukrs like vibdpr-bukrs,

      swenr like vibdpr-swenr,

      sgrnr like vibdpr-sgrnr,

      zpnumber like zlandr-zpnumber,

      zptype like zlandr-zptype,

      zpnotes like zlandr-zpnotes.

      &----


      *& Module USER_COMMAND_1000 INPUT

      &----


      • text

      ----


      MODULE USER_COMMAND_1000 INPUT.

      case sy-ucomm.

      when 'CRET'.

      wa_data-bukrs = vibdpr-bukrs.

      wa_data-swenr = vibdpr-swenr.

      wa_data-sgrnr = vibdpr-sgrnr.

      wa_data-zpnumber = zlandr-zpnumber.

      wa_data-xwetext = ' '.

      wa_data-xgrtxt = ' '.

      wa_data-zptype = zlandr-zptype.

      wa_data-zpnotes = zlandr-zpnotes.

      insert into zlandr values wa_data.

      when 'CHAN'.

      select single * from zlandr where bukrs = vibdpr-bukrs

      and swenr = vibdpr-swenr

      and sgrnr = vibdpr-sgrnr

      and zpnumber = zlandr-zpnumber.

      zlandr-zptype = zlandr-zptype.

      zlandr-zpnotes = zlandr-zpnotes.

      update zlandr.

      when 'DELE'.

      select single * from zlandr where bukrs = vibdpr-bukrs

      and swenr = vibdpr-swenr

      and sgrnr = vibdpr-sgrnr

      and zpnumber = zlandr-zpnumber.

      delete zlandr.

      endcase.

      ENDMODULE. " USER_COMMAND_1000 INPUT

      I have assigned the proper function codes to all of them .

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 05:52 AM

    what does this mean

    mara-matnr = mara-matnr.

    if your text field has name mara-mantr then no need to write above statement.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 15, 2009 at 06:49 AM

    Hi,

    Check the element list in SE51 something you have missed there.

    Also check in Pf status , in menu extras-> Active functions in current status.

    Regards,

    Himanshu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 25, 2009 at 05:58 AM

    Hello rock_plate,

    Has this already been solved? If not, try to go to the REACTION properties (near Function Codes) in your layout editor. Try to set it to 'D'. Just make sure that FunctionCodes for each button are already set. And make sure that the MODULE name you declare in PAI has INPUT in the end. (MODULE xxx INPUT.)

    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.