10

any way to determine if previous field is populated(during same loop iteration)...

 1 year ago
source link: https://answers.sap.com/questions/13910906/any-way-to-determine-if-previous-field-is-populate.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
22 hours ago

any way to determine if previous field is populated(during same loop iteration) inside FOR LOOP?

45 Views Last edit 24 minutes ago 4 rev

Hi Experts,

I have below code:

LOOP AT it_sales ASSIGNING <ls_sales>.
customer-sales_arrangement = VALUE #( BASE customer-sales_arrangement ( partner_functions = VALUE #( FOR <ls_pf> IN it_price WHERE ( vkorg = <ls_sales>-vkorg AND vtweg = <ls_sales>-vtweg AND spart = <ls_sales>-spart ) ( party_role_code = <ls_pf>-parvw partner_description = <ls_pf>-knref default_indicator = <fs_pf>-defpa ) partner_functions_list_complet = COND #( WHEN it_pf IS NOT INITIAL THEN sai_true ELSE sai_false ) ). ENDLOOP.

I filled field partner_functions for it or it may stay empty if no partner fn are supplied for a particular sales area.
Based on partner_functions, I have to set indicator in the next field which will be 0 if partner_functions is empty and 1 if filled.

I there a way to determine if the FOR loop filled partner_funtions, so I can set flag on next field?

Added Question: is there any way to do GROUP BY/CONTROL BREAK(at-endat) inside FOR LOOP? I need this for sales txt.

Regards,
Shailesh


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK