Dear All,

I just had this simple lesson but yet can be stressful for us when we're using HIDE. I used it on the program assigned to me ZMPUR_PO_EXPEDITING_RPT and it was used on AT LINE-SELECTION event to call a transaction which later on will display the PO. When using HIDE in a loop, don't put it after sy-uline (If you're writing table form report). Let's take a look at some part of the code below.

WRITE AT : /g_hoff001(1) sy-vline,
g_hoffset001(g_hwidth001) wa_temp_exp-ebeln,
g_hoff002(1) sy-vline,
g_hoffset002(g_hwidth002) wa_temp_exp-bedat,
g_hoff003(1) sy-vline,
g_hoffset003(g_hwidth003) wa_temp_exp-verkf,
g_hoff004(1) sy-vline,
g_hoffset004(g_hwidth004) wa_lfa1-telf1,
g_hoff005(1) sy-vline,
g_hoffset005(g_hwidth005) wa_temp_exp-reswk,
g_offlast(1) sy-vline.
WRITE / sy-uline(170).
HIDE: wa_temp_exp-ebeln,
wa_temp_exp-bsart.



If you do this, the AT LINE-SELECTION event will work properly when you double click on the sy-uline, not on the fields (ie wa_temp_exp-reswk). To make the event work properly as expected, simply put the HIDE before the sy-uline, so the code will look like this:

WRITE AT : /g_hoff001(1) sy-vline,
g_hoffset001(g_hwidth001) wa_temp_exp-ebeln,
g_hoff002(1) sy-vline,
g_hoffset002(g_hwidth002) wa_temp_exp-bedat,
g_hoff003(1) sy-vline,
g_hoffset003(g_hwidth003) wa_temp_exp-verkf,
g_hoff004(1) sy-vline,
g_hoffset004(g_hwidth004) wa_lfa1-telf1,
g_hoff005(1) sy-vline,
g_hoffset005(g_hwidth005) wa_temp_exp-reswk,
g_offlast(1) sy-vline.
HIDE: wa_temp_exp-ebeln,
wa_temp_exp-bsart.
WRITE / sy-uline(170).



So the event will work properly when you click on any of the fields.
Well, I hope this simple thing can help you when you're working with HIDE. Thanks to Albert who helped debug and resolve this problem.

0 Comments:

Post a Comment