‎2011 Nov 30 4:51 AM
Hello all,
I have created one program for mass changing variant values.
I am using FM RS_VARIANT_CONTENTS for fetching variant details and then FM RS_CHANGE_CREATED_VARIANT for changing variant values.
I have one issue in updating the date field values
If any screen have a date field then from FM RS_VARIANT_CONTENTS,in table valutab date value is coming in MM/DD/YYYY format.When I pass this to FM RS_CHANGE_CREATED_VARIANT then date get saved in some incorrect format(like //12//).
I know i have to change the date format to YYYYMMDD format before updating..but the issue is my program name is dyanamic and I do not know which field is of date type.
Is there any way to identify the data type of the field while reading variants?
Thanks in advance.
regards,
Lokesh
‎2011 Nov 30 5:36 AM
Check function RS_VARIANT_VALUES_TECH_DATA instead of RS_VARIANT_CONTENTS
If you are using RS_VARIANT_CONTENTS there is a parameter MOVE_OR_WRITE
The documentation says
The MOVE_OR_WRITE parameter determines in which format the values are output (concerns mainly date fields).
Example: MOVE_OR_WRITE = 'W' => Date in the form dd.mm.yyyy (depending on profile)
MOVE_OR_WRITE = 'M' => Date in the form yyyymmdd
By default its W so change it to M
Hope it helps
‎2011 Nov 30 5:17 AM
You can use function GET_GLOBAL_SYMBOLS. You can restrict the output by program name and selection screen field name. Among other things this function returns the data type of the field in the table FIELDLIST column TYPE
‎2011 Nov 30 5:36 AM
Check function RS_VARIANT_VALUES_TECH_DATA instead of RS_VARIANT_CONTENTS
If you are using RS_VARIANT_CONTENTS there is a parameter MOVE_OR_WRITE
The documentation says
The MOVE_OR_WRITE parameter determines in which format the values are output (concerns mainly date fields).
Example: MOVE_OR_WRITE = 'W' => Date in the form dd.mm.yyyy (depending on profile)
MOVE_OR_WRITE = 'M' => Date in the form yyyymmdd
By default its W so change it to M
Hope it helps
‎2011 Nov 30 6:03 AM
‎2011 Dec 13 7:23 AM
Hello all,
I had used FM RS_CHANGE_CREATED_VARIANT to modify variant values.
I found one strange issue:
Support one variant have two fields (field_1 and field_2)
field_1 S (blank)
Field_2 S I EQ value_low
Now suppose I want to fil onlyl field_1, then the above FM is not updating the value.
However when I tried modifying both field_1 and fied_2 then the values get modified.
Can anyone explain why is it happening?
regards,
Lokesh
‎2011 Nov 30 5:47 AM
Hi,
Before reading the variant values of a program use the function module 'RS_REPORTSELECTIONS_INFO', just pass the report name in REPORT paramater, the function module will return the selection screen fields info in table FIELD_INFO, you can get each field data type in this table.
Thanks & Regards
Bala Krishna P
‎2011 Dec 13 7:24 AM
‎2011 Dec 27 8:26 AM