Skip to Content

Urgent Please

Hi SDN's

my problem is when i enter a ( bukrs mail-type main-grp and sub-grp ) all 4 mandatory fields, i show related data on the screen, this is done as below

select single * from ZES_MAIL into IS_MAIL

where BUKRS = ZES_MAIL-BUKRS

and TYPE = ZES_MAIL-TYPE

and MAIN_GP = ZES_MAIL-MAIN_GP

and SUB_GP = ZES_MAIL-SUB_GP.

but if change the any of the above 4 mandatory fields, like i change sub-grp from 01 to 02 the screen fields are not changing because in the PBO my code is as below

if INT <> 1.

select single * from ZES_MAIL into IS_MAIL

where BUKRS = ZES_MAIL-BUKRS

and TYPE = ZES_MAIL-TYPE

and MAIN_GP = ZES_MAIL-MAIN_GP

and SUB_GP = ZES_MAIL-SUB_GP.

if SY-SUBRC eq 0.

ZES_MAIL-TO_EMAIL = IS_MAIL-TO_EMAIL.

ZES_MAIL-TO_NAME = IS_MAIL-TO_NAME.

ZES_MAIL-CC_EMAIL = IS_MAIL-CC_EMAIL.

ZES_MAIL-CC_NAME = IS_MAIL-CC_NAME.

INT = 1.

endif.

endif.

i had maintained INT because i avoid overwriting of newly entered data for displayed fields, but this does not work if i change teh mandatory fields.

How do i get the new data related to the changed mandatory fields in my screen?

please help

Thanks in advance

Gopi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 01, 2006 at 03:42 AM

    Hi Gopi ,

    The problem is because of the variable INT which you are assigning to 1 .

    So the best logic would be ,when you are selecting from the table and on the check of sy-subrc transfering to the table or wa IS_MAIL .read that table with new values for the second time .if sy-subrc <> 0 then select otherwise ignore that select .This is one way .

    The other way is you can keep the old values and match with the new values and if any change in the values you select otherwise ignore .

    Just try this ,it will work for you

    Thanks

    Dinesh Malhotra .

    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.