Rahul sir ...I m able to use hash # with inline data declaration without getting any error...how? There is no need of explicitly declare data declaration..
@@sapabapbyrahulmehta PARAMETERS : p_month TYPE STRING. SELECT vbeln , netwr from vbrk INTO TABLE @DATA(it_vbrk). *cond statement instead of if IF it_vbrk is NOT INITIAL . loop at it_vbrk INTO DATA(wa_mara) . DATA(text) = COND #( WHEN wa_mara-netwr > 100 and wa_mara-netwr
@@sapabapbyrahulmehta PARAMETERS : p_month TYPE string. SELECT vbeln , netwr FROM vbrk INTO TABLE @DATA(it_vbrk). *cond statement instead of if IF it_vbrk IS NOT INITIAL . LOOP AT it_vbrk INTO DATA(wa_vbrk) . DATA(text) = COND #( WHEN wa_vbrk-netwr > 100 AND wa_vbrk-netwr
Loop at lt_data. Case lt_data-x. When '1'. Lv_A = lt_data-f1. When '2'. Lv_B = lt_data-f1. Endcase How to pass f1 data in lV_A and lV_B based on when condition?
thankyou
Thank u sir
we are able to use # , with Inline declaration without getting any error.
If possible, Please send your code on rahul3620023@gmail.com or paste in the comment section.
👍
Rahul sir ...I m able to use hash # with inline data declaration without
getting any error...how?
There is no need of explicitly declare data declaration..
You will get a wrong output as system unable to predict the length. Paste your code here and I will explain the failed case.
@@sapabapbyrahulmehta
PARAMETERS : p_month TYPE STRING.
SELECT vbeln , netwr
from vbrk
INTO TABLE @DATA(it_vbrk).
*cond statement instead of if
IF it_vbrk is NOT INITIAL .
loop at it_vbrk INTO DATA(wa_mara) .
DATA(text) = COND #( WHEN wa_mara-netwr > 100 and wa_mara-netwr
Why I was unable to get error at the time of inline data declaration
@@sapabapbyrahulmehta
PARAMETERS : p_month TYPE string.
SELECT vbeln , netwr
FROM vbrk
INTO TABLE @DATA(it_vbrk).
*cond statement instead of if
IF it_vbrk IS NOT INITIAL .
LOOP AT it_vbrk INTO DATA(wa_vbrk) .
DATA(text) = COND #( WHEN wa_vbrk-netwr > 100 AND wa_vbrk-netwr
I hope you got my shared code...plz revert sir so I can clear my confusion why system behave like this
Loop at lt_data.
Case lt_data-x.
When '1'.
Lv_A = lt_data-f1.
When '2'.
Lv_B = lt_data-f1.
Endcase
How to pass f1 data in lV_A and lV_B based on when condition?
You can pass the data to from internal table to work area and in your CASE statement you can use work area-column name.
gun shoot explanation
Thank you. 😀