10-15-2015 2:32 PM
Hello Experts,
i have to check condition for two fields in AMDP , currently i have written the select query in amdp then i used a abap program to calculate the if condition and display the value in alv, but i dont want to use the if condition on the abap program , i want to do these if conditions on the AMDP program itself.
IF wa_mseg-bwart = '101' AND wa_mseg-sobkz = 'K'.
wa_final-mix_mat_qty_101 = wa_mseg-menge.
ELSEIF wa_mseg-bwart = '102' AND wa_mseg-sobkz = 'K'.
wa_final-mix_mat_qty_102 = wa_mseg-menge.
ELSEIF wa_mseg-bwart = '122' AND wa_mseg-sobkz = 'K'.
wa_final-cleaned_qty_122 = wa_mseg-menge.
please give me a solution for this , i want this conditions to be checked and the data should be feeded on the internal table on amdp..then i just want to use abap program to get value from internal table and display that in ALV.
thanks a lot .
10-15-2015 3:22 PM
Hi Ganesh,
you can have a look at method AMDP_GET_BP_CLASSIFICATION in Class CL_EPM_OIA_BP_CLASSIFY_AMDP (should be available in 740 SP5).
Alternatively, you might want to use a CASE statement (see https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a4389775191014b5a6bf2ccc0df2ed/content.htm).
Or see further information in http://help.sap.com/hana/sap_hana_sql_script_reference_en.pdf.
Please also consider the performance aspects of such imperative logic - you might want to consult the HANA Development experts in .
Cheers,
Jasmin
10-15-2015 3:22 PM
Hi Ganesh,
you can have a look at method AMDP_GET_BP_CLASSIFICATION in Class CL_EPM_OIA_BP_CLASSIFY_AMDP (should be available in 740 SP5).
Alternatively, you might want to use a CASE statement (see https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a4389775191014b5a6bf2ccc0df2ed/content.htm).
Or see further information in http://help.sap.com/hana/sap_hana_sql_script_reference_en.pdf.
Please also consider the performance aspects of such imperative logic - you might want to consult the HANA Development experts in .
Cheers,
Jasmin
10-15-2015 3:25 PM
10-16-2015 9:49 AM
Thank you Jasmin and amol .. i will check the conditions and let you know..