on 09-11-2008 10:32 AM
loop at gt_orderadm_h into gs_orderadm_h where process_type = 'Z501' OR process_type = 'Z116' .
wa_final-process_type = gs_orderadm_h-process_type.
wa_final-object_id = gs_orderadm_h-object_id.
wa_final-posting_date = gs_orderadm_h-posting_date.
wa_final-created_at = gs_orderadm_h-created_at .
wa_final-created_by = gs_orderadm_h-created_by .
wa_final-changed_at = gs_orderadm_h-changed_at.
wa_final-changed_by = gs_orderadm_h-changed_by.
wa_final-description = gs_orderadm_h-description.
loop at gt_partner into gs_partner where partner_fct = '00000002' or partner_fct = 'Z001'.
clear: wa_final-bp, wa_final-shp.
if gs_partner-partner_fct = '00000002'.
wa_final-shp = gs_partner-partner_no.
endif.
if gs_partner-partner_fct = 'Z001'.
wa_final-bp = gs_partner-partner_no.
endif.
endloop.
loop at gt_activity_h into gs_activity_h.
CLEAR: wa_final-category, wa_final-priority .
wa_final-category = gs_activity_h-category.
wa_final-priority = gs_activity_h-priority.
endloop.
loop at gt_refobj into gs_refobj.
CLEAR: wa_final-ib_ibase, wa_final-IB_INSTANCE , wa_final-PRODUCT_ID .
wa_final-ib_ibase = gs_refobj-ib_ibase.
wa_final-IB_INSTANCE = gs_refobj-IB_INSTANCE.
wa_final-PRODUCT_ID = gs_refobj-PRODUCT_ID.
endloop.
append wa_final to final.
endloop.
endloop.
perform build_fieldcatalog.
perform display_alv_report.
In ds all record r displaying properly except one parameters "gs_refobj".
Aftr 3 records it is piking same values in parameters "gs_refobj".
regards,
Ashish S.
Hi,
Use WHERE clause for loop as per your key mappings.
LOOP AT gt_refobj INTO gs_refobj.
This will solve your problem.
Regards,
Kunjal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LOOP AT gt_orderadm_h INTO gs_orderadm_h WHERE process_type = 'Z501' OR process_type = 'Z116' .
wa_final-process_type = gs_orderadm_h-process_type.
wa_final-object_id = gs_orderadm_h-object_id.
wa_final-posting_date = gs_orderadm_h-posting_date.
wa_final-created_at = gs_orderadm_h-created_at .
wa_final-created_by = gs_orderadm_h-created_by .
wa_final-changed_at = gs_orderadm_h-changed_at.
wa_final-changed_by = gs_orderadm_h-changed_by.
wa_final-description = gs_orderadm_h-description.
LOOP AT gt_partner INTO gs_partner WHERE partner_fct = '00000002' OR partner_fct = 'Z001'.
CLEAR: wa_final-bp, wa_final-shp.
IF gs_partner-partner_fct = '00000002'.
wa_final-shp = gs_partner-partner_no.
ENDIF.
IF gs_partner-partner_fct = 'Z001'.
wa_final-bp = gs_partner-partner_no.
ENDIF.
ENDLOOP.
LOOP AT gt_activity_h INTO gs_activity_h.
CLEAR: wa_final-category, wa_final-priority .
wa_final-category = gs_activity_h-category.
wa_final-priority = gs_activity_h-priority.
ENDLOOP.
LOOP AT gt_refobj INTO gs_refobj.
CLEAR: wa_final-ib_ibase, wa_final-ib_instance , wa_final-product_id .
wa_final-ib_ibase = gs_refobj-ib_ibase.
wa_final-ib_instance = gs_refobj-ib_instance.
wa_final-product_id = gs_refobj-product_id.
ENDLOOP.
APPEND wa_final TO final.
ENDLOOP.
ENDLOOP.
PERFORM build_fieldcatalog.
PERFORM display_alv_report.
See how nice you can make your code look using the tags to surround it.
matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.