I have a completely customized SAP screen used to create rental agreements. When tax jurisdiction is selected using the Help/Dialog (ie. F4 button) option, it causes the non-editable State and County tax fields to be populated. These two fields are strictly for display so that the user can validate their tax jurisdiction against the actual state and county.
To ensure all fields on the entire screen are valid, the program uses a PAI field chaining as shown below. The issue is that if I manually enter a new value in the tax jurisdiction field and press enter, then unless all other fields in the chain are also valid, then the state and county are not updated.
I manually force the updating of the state and county fields using function module DYNP_VALUES_UPDATE
, which works great, except for when one of the other fields in the below is invalid. How can I force the state and county fields to be updated on the screen even when one of the other fields in the chain is invalid? I'm starting to think this is simply not possible.
The tax jurisdiction field is called kna1-txjcd
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE setup_defaults.
MODULE screen_modify.
MODULE ltext_add_comments_0100.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
MODULE user_command_0100.
FIELD t001-bukrs MODULE check_sales_org. "DV1K933404
FIELD kna1-j_3gagext
MODULE check_customer_sales_area.
CHAIN.
FIELD: kna1-j_3gagext
MODULE check_cust_num.
MODULE verify_recipient. "DV1K935780
FIELD: zsd_etm_contract-bill_to_party
MODULE check_bill_to_party.
FIELD zsd_etm_contract-payer
MODULE check_payer_number. "CHG12588
ENDCHAIN.
CHAIN.
FIELD: kna1-txjcd
MODULE check_txjcd. "DV1K933404
FIELD: zsd_etm_contract-rig_num,
zsd_etm_contract-ship_via.
FIELD zsd_etm_contract-well_name.
FIELD:
zdls_ls, zdls_sc, zdls_twp, zdls_rg, zdls_m.
FIELD: znts_qtr_unit, znts_unit, znts_block,
znts_map.
FIELD: zlsd_other.
MODULE check_lsd_num .
FIELD: zsd_etm_contract-contact_tel_num,
zsd_etm_contract-cus_rep_loc,
zsd_etm_contract-cus_rep_tel_num,
zsd_etm_contract-cus_rep_fax_num,
zsd_etm_contract-cus_rep_email, "dv1k931160
zsd_etm_contract-lrg_contract, "DV1K935629
t001-bukrs, "DV1K935752
zsd_etm_contract-lrg_camp, "DV1K935752
zsd_etm_contract-customer_contact. "DV1K931062
FIELD:
zsd_etm_contract-cus_rep_loc
MODULE check_cus_rep_loc,
zsd_etm_contract-afe,
zsd_etm_contract-po,
zsd_etm_contract-msa,
zsd_etm_contract-cost_center,
zsd_etm_contract-gl
MODULE check_afe_po_msa_num,
zsd_etm_contract-invoice_approval
MODULE check_invoice_approval,
zsd_etm_contract-usage_type
MODULE check_usage_type.
FIELD: zsd_etm_contract-lrg_contract, "DV1K935629
t001-bukrs, "DV1K935752
zsd_etm_contract-lrg_camp. "DV1K935752
MODULE check_lrg_entries. "DV1K935752
FIELD:
zsd_etm_contract-prl_rep
MODULE check_prl_rep,
zsd_etm_contract-branch
MODULE check_branch,
zsd_etm_contract-bill_region, t001-bukrs
MODULE check_bill_region,
zsd_etm_contract-eoj_bill
MODULE check_eoj_bill,
zsd_etm_contract-sd_shd_flag,
zsd_etm_contract-next_set_date
MODULE check_next_set_date,
zsd_etm_contract-audit_flag,
zsd_etm_contract-ratetype. " CHG13225 DV1K939527
ENDCHAIN.
CHAIN.
FIELD: zsd_etm_contract-usage_type,
zsd_etm_contract-well_type.
MODULE check_well_type.
ENDCHAIN.
FIELD zsd_etm_contract-well_type.
MODULE get_well_type_text.
FIELD zsd_etm_contract-unit_num MODULE check_unit_num.
CHAIN.
FIELD: zsd_etm_contract-afe,
zsd_etm_contract-po,
zsd_etm_contract-msa,
zsd_etm_contract-gl.
MODULE combine_fields.
ENDCHAIN.
MODULE fill_wa_etm_contract.
MODULE check_ltext.
MODULE user_command_create_0100.
PROCESS ON VALUE-REQUEST.
FIELD: kna1-txjcd
MODULE help_txjcd,
zsd_etm_contract-prl_rep
MODULE help_prel_rep,
zsd_etm_contract-bill_to_party
MODULE help_bill_to_party.
FIELD: zsd_etm_contract-payer
MODULE help_payer.
FIELD: zsd_etm_contract-ratetype " CHG13225 DV1K939527
MODULE help_ratetype. " CHG13225 DV1K939527
UPDATE Below is a screenshot that shows the screen when I initially provide the Tax Jurisdiction Code using the F4 option. Note that the State, County and City as well as the corresponding taxes are updated.
In the below image I have changed the tax jurisdiction manually by typing in a new value, then pressed ENTER. Note that the State, County and City as well as the corresponding taxes have remained the same. They should have updated to completely different values, but do not appear to be doing so because of the CHAIN
issue (i.e. screen updates do not happen because a field is in an invalid state).