on
04-15-2024
3:25 PM
- last edited
2 weeks ago
by
jerryjanda
Hello,
I want to create a custom field in SAP Query that indicates whether a material has been in the warehouse for more than 6 weeks. The goal is to compare the material's posting date (MSEG.BUDAT_MKPF) with the current date (SY-DATUM) and display an 'X' in the custom field if the material's posting date is 42 days or more in the past (which corresponds to 6 weeks). Otherwise, the field should display an empty value.
Could you please confirm if the code provided below is appropriate for this problem? I am encountering some challenges with syntax and logical expressions within SAP Query, so I would appreciate any feedback or suggestions you might have.
IF ( MSEG.BUDAT_MKPF <= SY-DATUM - 42 ).
'X'
ELSE.
''
ENDIF.
Thank you!
Arjan
User | Count |
---|---|
61 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.