11-26-2013 9:38 AM
Hello Experts,
I have the following requirement, There are two fields in one of my screen, out of which only one field has F4 help.
1)When i press F4, the pop up must have three fields as below,
2) Now when i select any row from this pop up, my field which have the F4 help must be populated by the sales doc value, and my second field must be populated with item value in one go.
Am done with the first point and am yet to be done with the second point, requesting you to please help me on this.
Thanks in advance,
Satish.
11-26-2013 1:45 PM
Hi all,
I Resolved the issue myself.
This is the code i used,
SELECT VBELN POSNR MATNR FROM VBAP INTO TABLE IT_VBAP.
SORT IT_VBAP BY SALESDOC.
WA_MAP-FLDNAME = 'F0001'. "FIELD FOR POSITION 1
WA_MAP-DYFLDNAME = 'VBAP-ZZCTNO'.
APPEND WA_MAP TO IT_MAP.
WA_MAP-FLDNAME = 'F0002'. "FIELD FOR POSITION 2
WA_MAP-DYFLDNAME = 'VBAP-ZZITNO'.
APPEND WA_MAP TO IT_MAP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SALESDOC'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'VBAP-ZZCTNO'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_VBAP
DYNPFLD_MAPPING = IT_MAP.
ENDMODULE.
Please let me know for any Info.
11-26-2013 11:44 AM
11-26-2013 12:39 PM
Hi farid,
Thanks for your reply, below is my code can you help how can i change this for meeting my requirement,
Please guide by changing this code as per my requirement,
TYPES: BEGIN OF TY_VBAP,
SALESDOC TYPE VBAP-VBELN,
ITEM TYPE VBAP-POSNR,
MATERIALENTERED TYPE VBAP-MATNR,
END OF TY_VBAP.
DATA: IT_VBAP TYPE STANDARD TABLE OF TY_VBAP,
WA_VBAP TYPE TY_VBAP.
.
MODULE CONTRACT.
SELECT VBELN POSNR MATNR FROM VBAP INTO TABLE IT_VBAP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'SALESDOC'
DYNPPROG = SY-REPID
DYNPNR = sy-dynnr
DYNPROFIELD = 'VBAP-ZZCTNO'
VALUE_ORG = 'S'
tables
value_tab = IT_VBAP
ENDMODULE.
11-26-2013 1:45 PM
Hi all,
I Resolved the issue myself.
This is the code i used,
SELECT VBELN POSNR MATNR FROM VBAP INTO TABLE IT_VBAP.
SORT IT_VBAP BY SALESDOC.
WA_MAP-FLDNAME = 'F0001'. "FIELD FOR POSITION 1
WA_MAP-DYFLDNAME = 'VBAP-ZZCTNO'.
APPEND WA_MAP TO IT_MAP.
WA_MAP-FLDNAME = 'F0002'. "FIELD FOR POSITION 2
WA_MAP-DYFLDNAME = 'VBAP-ZZITNO'.
APPEND WA_MAP TO IT_MAP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SALESDOC'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'VBAP-ZZCTNO'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_VBAP
DYNPFLD_MAPPING = IT_MAP.
ENDMODULE.
Please let me know for any Info.