‎2007 Jan 05 3:05 PM
Hi to all!!! this time i have a problem with a Module Pool, so i decided to ask in the forum.
The situation is tike this:
I have a Screen 0100 with 3 subscreen : 0101, 0102 and 0103.
In my first subscreen (0101) there are a lot of field that have a description.
EXAMPLE:
PRODUCER:___1000045 Michael LAudrup F.G
All the Description are searched in the FIELD of PAI.
FIELD e_CAB-LIFNR MODULE VALIDATE_PRODUCER ON INPUT.
Now the problem:
In Subscreen 0101, I have three fields that are the key fields of a Ztable.
When the three of them, are not initial, i search on that Ztable if there is some info for that keys.
if the information exists, then i complete the screen with the obtained values of the Z table.
Finally my problem is that the description of the remaining fields does not appear since they are within the modules. They appear when i press 'Enter' again.
Any suggestion to solve my problem...
how to recall my current dynpro??how to simulate an 'Enter'?
Sorry for my English.
If something of the text were not understood , just tell me, and I will try to explain it better.
As usual rewards points for help.
Thanks in advance!
‎2007 Jan 05 3:32 PM
Hi
Probably some FIELD stataments are not place correctly in PAI, you should post the screen flow to understand the problem.
Max
‎2007 Jan 05 3:32 PM
Hi
Probably some FIELD stataments are not place correctly in PAI, you should post the screen flow to understand the problem.
Max
‎2007 Jan 05 3:43 PM
Hi Andrew,
Sorry .. i couldn't get you..
do you want this .. as you input value in third key field ..all other value should appear in other fields from that table....right..?
but how system would know that the value is completed or not..either u have to click or enter.
Supppose in third field, lenght of te value varies , suppose your third field is sales order that lenght varieds from 8 to 10, if you want to enter 10 digit value and how system will know that the value is complete or not...
I hope you understand me...
This type of business requirement should not be there as per my experience says.... okie..this can be possible after 'click' or 'Enter' , and i will say is should be in same manner...
Thanks & Regards,
Dinesh Goyal
‎2007 Jan 05 3:47 PM
my code:
PROCESS BEFORE OUTPUT.
MODULE hide_selection.
MODULE des_fields_by_purchase.
PROCESS AFTER INPUT.
Validate
CHAIN.
<b> FIELD e_cab-anio MODULE validate_cab_anio ON REQUEST.
FIELD e_cab-centro MODULE validate_centro ON REQUEST.
FIELD e_cab-tropa MODULE validate_tropa ON REQUEST.</b>
FIELD e_cab-tipo_fae MODULE validate_tipo_fae ON INPUT.
FIELD e_cab-tipo_com MODULE validate_tipo_com ON INPUT.
FIELD e_cab-fecha_fae MODULE validate_fecha_fae ON INPUT.
FIELD e_cab-fecha_rec MODULE validate_fecha_rec ON INPUT.
FIELD e_cab-cabezas_fae MODULE validate_cabezas_fae ON INPUT.
FIELD e_cab-cconsig MODULE validate_cuit_cconsig ON INPUT.
FIELD e_cab-cproduc MODULE validate_cuit_cproduc ON INPUT.
FIELD e_cab-ccompra MODULE validate_cuit_ccompra ON INPUT.
FIELD e_cab-ctransp MODULE validate_cuit_ctransp ON INPUT.
FIELD e_cab-ccliente MODULE validate_cuit_cliente ON INPUT.
ENDCHAIN.
The first, second and third are the key fields.
An example of how the modules search the description is:
MODULE validate_tipo_fae INPUT.
SELECT SINGLE descr
FROM zmm014a_tfaena
into e_descr-tfae
WHERE ( tipo_fae EQ e_cab-tipo_fae ).
IF sy-subrc NE 0.
clear e_descr-tfae.
MESSAGE e002(zmm014_manu) WITH e_cab-tipo_fae.
ENDIF.
ENDMODULE. " VALIDAR_TIPO_FAE INPUT
I hope this could help you.
Thanks!!
Andrew83
‎2007 Jan 05 4:05 PM
<b>FIELD e_cab-anio MODULE validate_cab_anio ON REQUEST.
FIELD e_cab-centro MODULE validate_centro ON REQUEST.
FIELD e_cab-tropa MODULE validate_tropa ON REQUEST.</b>
inside this three Modules there is a Form with code like this:.
****************************************************************
IF not e_cab-tropa is initial and
not e_cab-centro is initial and
not e_cab-anio is initial.
SELECT SINGLE *
FROM zmm014a_cab
into corresponding fields of e_cab
WHERE tropa eq e_cab-tropa and
centro eq e_cab-centro and
anio eq e_cab-anio.
****************************************************************
So e_Cab registry is filled.
After this at the pbo i do a loop at screen changin de screen-input feature to 0,so all the fields appear in visualize mode. Finally i have all the fields with the information i want, but any description was fill because the program didn't enter again to the pai.
Sorry for my English again.
‎2007 Jan 05 4:17 PM
Hi
You wrote: ...Finally my problem is that the description of the remaining fields does not appear since they are within the modules. They appear when i press 'Enter' again....
This behavior usually depends on FIELD statament, if it uses it the value of the field is available when its FIELD statament is reached.
So u should have insert in the same control these fields:
[code[CHAIN.
FIELD e_cab-anio.
FIELD e_cab-centro.
FIELD e_cab-tropa.
MODULE CK_ANIO_CENTRO_TROPA.
............................
ENDCHAIN.[/code]
In this way when the program runs the module CK_ANIO_CENTRO_TROPA, all fields E_CAB-ANIO, E_CAB-CENTRO and E_CAB-TROPA should be available because their FIELD statament were done.
Max