Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

F4 Help

Former Member
0 Likes
379

HI guys,

This is gururaj,

i am using Function module 'F4IF_FIELD_VALUE_REQUEST'.

For this iwant to give condtion depending on some filed in Search help,

how can give condition for search help parameters in FM.

i am using my custom Search help and passing to this FM,

i want to pass if constion type 'A' dispaly Oreders with respect to Condition type 'A',

and if Contion type "B' i want to get orders wrt to "B'.

Plz help me out by solving tjis issue.

2 REPLIES 2
Read only

Former Member
0 Likes
341

Hi patil,

AT SELECTION-SCREEN ON VALUE-REQUEST FOR LOC.

DESCRIBE TABLE CTRY LINES CNUMLINES.

field_value-fieldname = 'CTRY-LOW'.

APPEND field_value TO dynpro_values.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = SY-REPID

dynumb = SY-DYNNR

translate_to_upper = 'X'

TABLES

dynpfields = dynpro_valueS

EXCEPTIONS

INVALID_ABAPWORKAREA = 1

INVALID_DYNPROFIELD = 2

INVALID_DYNPRONAME = 3

INVALID_DYNPRONUMMER = 4

INVALID_REQUEST = 5

NO_FIELDDESCRIPTION = 6

INVALID_PARAMETER = 7

UNDEFIND_ERROR = 8

DOUBLE_CONVERSION = 9

STEPL_NOT_FOUND = 10

OTHERS = 11

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

SORT dynpro_values BY FIELDVALUE.

DELETE ADJACENT duplicates FROM dynpro_values COMPARING FIELDVALUE.

IF CNUMLINES IS INITIAL.

LOOP AT dynpro_values INTO FIELD_VALUE.

WAC-SIGN = 'I'.

WAC-OPTION = 'EQ'.

WAC-LOW = FIELD_VALUE-FIELDVALUE.

INSERT WAC INTO CTRY INDEX 1 .

*APPEND WAC TO CTRY.

CLEAR FIELD_VALUE.

ENDLOOP.

ENDIF.

CLEAR FIELD_VALUE.

READ TABLE dynpro_values INDEX 1 INTO field_value.

IF field_value-fieldvalue = ' '.

SELECT BU~PARTNER

BU~MC_NAME1

INTO CORRESPONDING FIELDS OF TABLE IT_LOC

FROM BUT100 AS BT INNER JOIN M_BUPAA AS BU

ON BTPARTNER = BUPARTNER

WHERE BT~RLTYP = 'ZUP004'.

ELSE.

SELECT BU~PARTNER

BU~MC_NAME1

INTO CORRESPONDING FIELDS OF TABLE IT_LOC

FROM BUT100 AS BT INNER JOIN M_BUPAA AS BU

ON BTPARTNER = BUPARTNER

FOR ALL ENTRIES IN CTRY

WHERE BT~RLTYP = 'ZUP004'

AND COUNTRY = CTRY-LOW.

ENDIF.

CLEAR : CNUMLINES.

DESCRIBE TABLE CTRY LINES CNUMLINES.

if CNUMLINES = '1'.

DELETE CTRY WHERE SIGN = 'I'.

endif.

DELETE IT_LOC WHERE PARTNER+0(1) = '1'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'PARTNER'

DYNPPROG = SY-REPID

DYNPNR = sy-dynnr

DYNPROFIELD = 'LOC'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = it_loc.

Regards,

sabari

Read only

former_member404244
Active Contributor
0 Likes
341

Hi,

take two different internal tables having same structure as ur internal table where u get ur orders for condition types A and B.now put the records in one internal table for condition type 'A' records and second internal table with condition type 'B' records ,now call ur fm 'F4IF_FIELD_VALUE_REQUEST' two times one with internal table 1 with condition type 'A' and other internal table 2 with condition type 'B' .

Regards,

Nagaraj