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

Module Pool

Hi,

I have created a screen and given the below details,but it's not woking properly.Can anyone tell me what wrong in the code or how should I write it.The table is already exist.

SCREEN-9002

Case sy-ucomm.

When u2018SHOWu2019.

Select * from zemp_table where emp-id = zemp_table-empid.

Endselect.

When u2018INSERTu2019.

Insert zemp_table.

Endselect.

When u2018DETAILu2019.

Submit zalv_emp_table_details via selection-screenusing selecton set

u2018var1u2019 and return.

Endcase.

When u2018DELETEu2019.

Delete from zemp_table where emp-id = zemp_table-emp-id.

Endcase.

When u2018MODIFYu2019.

Modify zemp_table.

endcase.

When u2018CLEARu2019.

clear zemp_table.

endcase.

When u2018PRINTu2019.

Submit zsmart_emp_table via selection-screen u2018var2u2019 and return.

Endcase.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 06:55 AM

    Hi,

    SCREEN-9002

    Case sy-ucomm.

    When u2018SHOWu2019.

    Select * from zemp_table where emp-id = zemp_table-empid.

    Endselect.

    When u2018INSERTu2019.

    Insert zemp_table.

    Endselect.

    When u2018DETAILu2019.

    Submit zalv_emp_table_details via selection-screenusing selecton set

    u2018var1u2019 and return.

    Endcase.

    When u2018DELETEu2019.

    Delete from zemp_table where emp-id = zemp_table-emp-id.

    Endcase.

    When u2018MODIFYu2019.

    Modify zemp_table.

    endcase.

    When u2018CLEARu2019.

    clear zemp_table.

    endcase.

    When u2018PRINTu2019.

    Submit zsmart_emp_table via selection-screen u2018var2u2019 and return.

    Endcase.

    ENDCASE is not necessary in every WHEN condition.

    ENDSELECT in second when condition is not required.

    Best regards,

    raam

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:01 AM

    Hi,

    Try with this following code.

    
    SCREEN-9002
    
    Case sy-ucomm.
    
    When u2018SHOWu2019.
    Select  * from zemp_table where emp-id = zemp_table-empid.
    Endselect.
    
    When u2018INSERTu2019.
    Insert zemp_table.
    
    
    When u2018DETAILu2019.
    Submit zalv_emp_table_details via selection-screenusing selecton set 
    u2018var1u2019 and return.
    
    
    When u2018DELETEu2019.
    Delete from zemp_table where emp-id = zemp_table-emp-id.
    
    
    When u2018MODIFYu2019.
    Modify zemp_table.
    
    
    When u2018CLEARu2019.
    clear zemp_table.
    
    
    When u2018PRINTu2019.
    Submit zsmart_emp_table via selection-screen u2018var2u2019 and return.
    Endcase.
    
    

    Thanks

    Murugan.B

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 07:11 AM

    Hi,

    The problem lies in case and endcase.

    you have put the endcase many times. for one case ther is only one endcase.

    sample code:

    case sy-ucomm.

    when 'CREATE' .

    ..................

    when 'CHANGE'.

    ...........

    when 'DISPLAY'.

    ...........

    endacse.

    I hope this will solve ur problem.

    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.