cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Query / ABAP

wanrooy
Explorer
0 Kudos
252

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

 

Accepted Solutions (0)

Answers (0)