on 05-20-2015 5:02 PM
Hi All
I have following attached scenario,
Based on the condition Linetype flag,I have to derive Calweek either from Ship date or Cancel date
I have written code as below, Could any one correct me where I went wrong,( I am not expert in ABAP)
It giving dump saying attached,
Thanks in advance.
Line Type
Actual Shipment Date
Cancel date
If Linetype =S
Calweek has to derive from Actual shiment Date
Else If Line Type = X
Calweek has to derive from Cancel date.
I have written following way
DATA: lv_calweek_date TYPE scal-date,
lv_week TYPE scal-week.
IF SOURCE_FIELDS-/bic/z_plintyp EQ 'S'.
lv_calweek_date = SOURCE_FIELDS-/bic/z_pactsdt .
ELSEIF SOURCE_FIELDS-/bic/z_plintyp EQ 'X'.
lv_calweek_date = SOURCE_FIELDS-/bic/z_pcncldt .
ENDIF.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = lv_calweek_date
IMPORTING
week = lv_week
result = lv_week.
clear lv_calweek_date.
clear lv_week.
But when laoding I am getting Following error
Hi Sreekanth,
what is the length of "z_plintyp" and "z_plintyp " two infoobjects.
if length is above two infoobjects is "1" then it should work, if length more than "1" you have to use offset
just like below
IF SOURCE_FIELDS-/bic/z_plintyp+0(1) EQ 'S'.
please attach , error message.
Thank you,
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phani and Nanda,
Thanks for the reply, Now its working
Thanks a lot for your time for looking into this..
Best Regards
Sree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
can you write the simple formula.
DATE_GET_WEEK(Actual shiment Date)
map the source fields to target fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.