select sy-datum+0(4) 也可以这样直接操作,建议先用变量保存 问题 2. 如何在SELECT-OPTIONS中写可以选年月,而不是年月日的 直接调用日期函数 F4_DATE ,弹出对话框的形式或手工输入完整的日期,然后截取日期字符串前4位, 即:YYYYMM, 得到年月。另一种方法是:做两个输入选项,手动输入年YYY...
从第一个字符开始截取6位,之所以是0是因为位置值是从0开始。
0 Kudos 3,062 SAP Managed Tags: ABAP Development How to convert a date in DD.MM.YYYY to sy-datum format i.e., YYYYMMDD ? Thanks in Advance. NabaReply 1 ACCEPTED SOLUTION Former Member 2007 Mar 08 6:41 AM 0 Kudos 765 SAP Managed Tags: ABAP Development Hi, Use FM ...
SAP Managed Tags: ABAP Development hi all , In sy-datum why it is using the year 6(4) like that actually what it mean i know sy-datum is the actual system date to extract the year month date seperately dey r using and the same in gjahr is dey are using 4(2) what it means Wi...
SAP Managed Tags: ABAP Development hi madan., sy-datum length is only 8. and it takes the date as YYYYMMDD format. if you want to decrease the date by 2 months use this stmt sy-datum+4(2) - 2. or use FM CCM_GO_BACK_MONTHS Reward points if useful Chandra Message was edited...
SAP Managed Tags: ABAP Development hi, try this function module: CONVERT_DATE_TO_EXTERNAL this will give u the date in the format u require. here is the code for it data : d type date. CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' EXPORTING DATE_INTERNAL = SY-DATUM IMPORTING DATE_EXTERNAL...
if sy-datum format is yyyymmdd. month = sy-datum+4(2). year = sy-datum+0(4). Reply sreeramkumar_madisetty Active Contributor 2007 Feb 20 4:16 AM 0 Kudos 2,526 SAP Managed Tags: ABAP Development Hi Sy-datum month : 2+(sy-datum(2)) Year : 4+(sy-datum(4)) Regar...
SAP Managed Tags: ABAP Development this code works perfectly parameters: day like sy-datum. data: today like sy-datum. data: diff type i. today = sy-datum. diff = today - day. write 😕 diff. make sure both your date fields are in the correct format enter into debug mode and chec...