Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Variant Issue in Abap Program

Former Member
0 Likes
842

I came across this strange issue with Variants: Please let me know if anyone has come cross this issue.

Issue: I select a variant for a Zreport which has email address in the selection screen. Now i select another variant in which there is no email address but still i see the email address. basically the first variant value is being passed when i select the second variant.

Code:

SELECTION-SCREEN : BEGIN OF BLOCK em WITH FRAME TITLE text-307.

PARAMETERS: p_send TYPE char1 AS CHECKBOX DEFAULT ''.

SELECT-OPTIONS :s_emails FOR somlreci1-receiver NO INTERVALS.

SELECTION-SCREEN : END OF BLOCK em.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
682

Hi Vellore Vasudeva Rao,

there can be several reasons :

- the one given by Thomas

- The parameter refers to a data element which has a SET/GET parameter, in that case an empty value is overwritten by the SET/GET parameter (see [SAP note 74501 (SPA/GPA parameters and variants)|https://service.sap.com/sap/support/notes/74501])

- The parameter in the variant may have option "Save field without value" checked

BR

Sandra

3 REPLIES 3
Read only

Former Member
0 Likes
682

Hi Vasudev,

I have not seen any issue like that before,

Try creating the variant again,

Step1: enter an email address and then save

Step2: name the variant as var1 and then save

Step3: now remove the email address and then save

Step4: name the variant as var2 and then save.

Step5: refresh by /n followed by the T code

Step6: try it out now with both the variants

Revert for further clarification

Thanks

Sri

Read only

ThomasZloch
Active Contributor
0 Likes
682

Possibly that second variant was saved before the email field was introduced and thus does not store the emtpy value. Try saving the second variant again with empty email address as suggested.

Thomas

Read only

Sandra_Rossi
Active Contributor
0 Likes
683

Hi Vellore Vasudeva Rao,

there can be several reasons :

- the one given by Thomas

- The parameter refers to a data element which has a SET/GET parameter, in that case an empty value is overwritten by the SET/GET parameter (see [SAP note 74501 (SPA/GPA parameters and variants)|https://service.sap.com/sap/support/notes/74501])

- The parameter in the variant may have option "Save field without value" checked

BR

Sandra