‎2017 Sep 20 12:35 PM
Hi all,
I need to create a variant from the program . i know that we can use FM RS_CREATE_VARIANT to create a variant. but my problem is i am unable to create variant with free selections/Dynamic Selection .
Example : If I wan to pass value for dynamic fields in SAP FBL1N transaction from my program how can I do ?
I checked FM RS_REFRESH_FROM_SELECTOPTIONS but it is not returning dynamic section fields
Thanks,
Santosh.
‎2017 Sep 25 5:52 AM
FM : RS_CREATE_VARIANT
in above fm user table parameter : VARI_CONTENTS LIKE RSPARAMS
for this pass select-option or parameter using by S / P and values.
‎2017 Sep 25 6:26 AM
Hi Krishna Murthy,
Thanks you for your time.
As you mentioned in this parameter ( VARI_CONTENTS LIKE RSPARAMS ) we are passing values for the normal selection fields.
where as for dynamic selection fields we don't have field names(fields declared dynamically), so how can we pass this dynamic fields in RS_CREATE_VARIANT function module ?
Thanks,
Santosh.
‎2017 Sep 25 9:01 AM
This has been answered in this thread, with an sample code: https://answers.sap.com/questions/198724/changing-field-values-in-free-selections-multiple.html
(you have to update the dynamic parameters after the variant has been created, using the function module RS_VARIANT_VALUE_SAVE)
‎2017 Sep 25 12:16 PM
Hi Rossi,
Thanks for your time..
I have checked above scn link. but I am not sure which structures we have to fill and in below function module in table parameters it is mentioned that date fields but I have to pass normal fields like "vendor country" (FBL1N report dynamic field). can you provide any sample program.
RS_VARIANT_VALUE_SAVE
‎2017 Sep 25 1:24 PM
I already answered that there was a sample code in the thread mentioned above, which was for condition SPFLI-CONNID = '0003' AND SPFLI-DEPTIME = sy-uzeit, but of course you need to indicate the technical name of the vendor country field (press F1 on the screen field).
‎2017 Sep 27 7:40 AM
Hi Rossi,
Now I am able to pass dynamic selection fields in variant which are already selected as a default. my transaction is FBL1N
Once dynamic selection fields values are copied using RS_VARIANT_VALUE_SAVE function module existing selection field values are cleared.
Can you tell me how can we change variant without disturbing existing selection fields data.
Regards,
Santosh.