2009 May 16 7:23 AM
hello
i have requirement that i have to create f4 help as per data in previous column.
means suppose in po column po =10 i have to take data according to that.
2009 May 16 10:48 AM
HI Rajan,
write the code after PAI in the screen like this..
*F4 Help
PROCESS ON VALUE-REQUEST.
FIELD w_ponumber MODULE f4_tablecontrol_field. "Table control field..
MODULE f4_tablecontrol_field INPUT.
CLEAR : selline ,selindex.
* getting the cursor line in Table Control
GET CURSOR FIELD selfield LINE selline.
selindex = tc_batch-top_line + selline - 1. "tc_batch is the table control name..
* Read internal table of table control with f4 cursor selected
READ TABLE t_ekko INTO wa_ekko
INDEX selindex.
if sy-subrc = 0.
move ponumner to another field...
endif.
select Po_number from ekpo into table t_ekpo
where po_item = data read from above poitem or number.
"call function module
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR' "Internal table field
dynpprog = sy-repid
dynpnr = '2010' "screen number
dynprofield = 'W_PONUMBER '
value_org = 'S'
TABLES
value_tab = t_ekpo.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " f4_tablecontrol_field INPUT
Regards,
Prabhudas
2009 May 16 9:01 AM
2009 May 16 10:48 AM
HI Rajan,
write the code after PAI in the screen like this..
*F4 Help
PROCESS ON VALUE-REQUEST.
FIELD w_ponumber MODULE f4_tablecontrol_field. "Table control field..
MODULE f4_tablecontrol_field INPUT.
CLEAR : selline ,selindex.
* getting the cursor line in Table Control
GET CURSOR FIELD selfield LINE selline.
selindex = tc_batch-top_line + selline - 1. "tc_batch is the table control name..
* Read internal table of table control with f4 cursor selected
READ TABLE t_ekko INTO wa_ekko
INDEX selindex.
if sy-subrc = 0.
move ponumner to another field...
endif.
select Po_number from ekpo into table t_ekpo
where po_item = data read from above poitem or number.
"call function module
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR' "Internal table field
dynpprog = sy-repid
dynpnr = '2010' "screen number
dynprofield = 'W_PONUMBER '
value_org = 'S'
TABLES
value_tab = t_ekpo.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " f4_tablecontrol_field INPUT
Regards,
Prabhudas
2009 May 16 2:16 PM
2009 May 16 2:37 PM
There are numerous posts on this topic, would have found your answer only if you had searched on SCN before posting.
regards,
Advait
2009 May 16 2:44 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |