‎2014 Jun 13 3:28 PM
Hi All,
In selection screen I have 3 fields Plant, material number , po number. When I enter plant as 1000, I should not get a chance of creating a variant.
If plant is not 1000 I should get a chance for creating a variant.
Thanks in Advance.
‎2014 Jun 13 4:08 PM
Hi,
Some code: AA is blocked.
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK block02 WITH FRAME .
PARAMETERS: p_carrid TYPE sflight-carrid OBLIGATORY .
SELECTION-SCREEN END OF BLOCK block02 .
*----------------------------------------------------------------------*
AT SELECTION-SCREEN .
PERFORM at_selection_screen_input .
*----------------------------------------------------------------------*
FORM at_selection_screen_input .
IF sy-ucomm EQ 'SPOS' and p_carrid eq 'AA' .
MESSAGE e222(dbman).
* It is not possible to save variants
ENDIF .
ENDFORM . "at_selection_screen
*----------------------------------------------------------------------*
Regards.
‎2014 Jun 13 4:08 PM
Hi,
Some code: AA is blocked.
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK block02 WITH FRAME .
PARAMETERS: p_carrid TYPE sflight-carrid OBLIGATORY .
SELECTION-SCREEN END OF BLOCK block02 .
*----------------------------------------------------------------------*
AT SELECTION-SCREEN .
PERFORM at_selection_screen_input .
*----------------------------------------------------------------------*
FORM at_selection_screen_input .
IF sy-ucomm EQ 'SPOS' and p_carrid eq 'AA' .
MESSAGE e222(dbman).
* It is not possible to save variants
ENDIF .
ENDFORM . "at_selection_screen
*----------------------------------------------------------------------*
Regards.
‎2014 Jun 14 2:04 PM
Hi Eitan,
Thanks for ur rply.I will check it on Monday and get I back to u.
‎2014 Jun 16 6:56 AM
Hi Eitan,
Thanks for ur rply and it is working fine. But I want to know that why we compared sy-ucomm with spos.
Give detail explanation regarding this.
Regards,
Chakradhar.
‎2014 Jun 16 7:16 AM
Hi,
"SPOS" is the value the system supply in sy-ucomm when we are using "save as variant" .
Add a break point at: IF sy-ucomm EQ 'SPOS' and p_carrid eq 'AA' .
Then run the report and check sy-ucomm content what do you have now ?
Regards .
‎2014 Jun 16 7:17 AM
‎2014 Jun 16 7:19 AM
Hi Eitan,
I understood that but I want to know how you know all these things.
Regards,
Chakradhar.
‎2014 Jun 16 7:36 AM
Hi,
Tough question...
Look at my picture and look a the white hair......
This represents 40+ years of programing experience (I am a newbie in SAP).
Just think how many bugs I managed to generate...
You just have to go on learning until the day you die ignorant....
Today you learned about sy-ucomm .
Regards .
‎2014 Jun 16 7:46 AM
Hi Eitan,
I know about the sy-ucomm earlier itself but I learnt about the saving as variant is related to the system field SPOS. As I am just beginner of ABAP , you must help me in any sort of issues which I post.
Moderator message: no-one must help you at all. This site is entirely voluntary.
Regards,
Chakradhar.
Message was edited by: Matthew Billingham
‎2014 Jun 16 7:55 AM
‎2014 Jun 16 7:57 AM
‎2014 Jun 16 7:57 AM
Dear Yannam,
This site is not to service you alone.
It is not mandatory to answer your questions. No one will sit and answer your queries.
You have to explore your self that what is the meaning of the information given by experts. No one has time to explain you in detail.
Please go through the rules of engagement of SCN:
I hope you understood.
Regards,
Chandra
‎2014 Jun 16 8:18 AM