2022 Mar 13 9:06 AM
hi everyone,
i have a question now i create this screen with screen painter and i want when i fill the field 'Société' and click enter the other fiels 'localité' and 'matricule fiscal' filled automatically.
i need your help if you can help me with code syntax.
this is my code but it doesn't work.
BUKRS refers to the field named Société
ORT01 refers to the field named Localité
PAVAL refers to the field named Matricule fiscal


this is my screen.

2022 Mar 13 12:19 PM
Please post the code as text instead of image, so that one can easily answer by testing your code.
Debug your code to understand why it doesn't work.
2022 Mar 13 11:17 PM
this is my code.
déclarer zdeclaraison_employeur.
Les données :
ok_code comme sy-ucomm.
types : début de ty_field,
BUKRS TYPE BUKRS ,
TYPE ORT01 ORT01 ,
PAVAL TYPE PAVAL ,
fin de ty_field.
données wa_field type ty_field.
inclure ziwd_dec.
début de sélection.
effectuer fill_field_automatically.
écran d'appel 0100.
"contenu de l'inclusion
formulaire fill_field_automatically.
sélectionner unique
ORT01 de t001 à
wa_field-ORT01
où BUKRS = BUKRS .
ORT01 = wa_field-ORT01.
sélectionner unique
PAVAL de t001 à
wa_field-PAVAL
où BUKRS = BUKRS et PARTY = 'SAP01'.
PAVAL = wa_champ-PAVAL.
forme terminale.
2022 Mar 14 8:33 AM
Also, edit your question (instead of adding comments) and format the code using the "CODE" button: these actions make for easier reading and increase your chances of getting help.