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

Facing problem in F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
3,154

Hi all,

   I had used the above function module in my code.It was working fine but after upgradation from ehp5 to ehp 6 ,its not working any more.Need your help to resolve this issue. here is my code:

      SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text1.
PARAMETERS: rb1
RADIOBUTTON GROUP grp1   DEFAULT 'X' USER-COMMAND uc.
PARAMETERS : rb2 RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK b.


SELECTION-SCREEN  BEGIN OF BLOCK b1 WITH FRAME TITLE text.
*PARAMETERS : s_matnr LIKE mara-matnr   MODIF ID aaa .
SELECT-OPTIONS : s_matnr FOR mara-matnr   MODIF ID aaa .
SELECT-OPTIONS :   s_plant FOR eban-werks   MODIF ID aaa.
PARAMETERS : s_req LIKE eban-afnam  MODIF ID aaa.
*PARAMETERS : pr_qty LIKE  eban-menge  MODIF ID aaa.
PARAMETERS: trak_id
LIKE zbednr-bednr MODIF ID bbb,
*            ved TYPE  marc-loggr,
token_no
LIKE zjust_format-tokenno  MODIF ID aaa.
SELECT-OPTIONS :   aprvd_dt FOR zjust_format-date1.
*PARAMETERS: s_budat LIKE s031-sptag DEFAULT sy-datum.
SELECTION-SCREEN  END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2.
PARAMETERS: c1
AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b2.
*
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rb1 = 'X' AND c1 =  ' ' .
IF screen-group1 = 'AAA'.
screen-active =
1.
MODIFY SCREEN.
ENDIF.
ENDIF.

IF rb2 = 'X' AND c1 = ' '.
IF screen-group1 = 'AAA'.
screen-active =
0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.

LOOP AT SCREEN .
IF screen-group1 = 'BBB'.
screen-input =
0 .
MODIFY SCREEN .
ENDIF.
ENDLOOP.
set CURSOR field 'TOKEN_NO'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR trak_id.
LOOP AT SCREEN.
IF screen-group1 = 'BBB'.
screen-input =
1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*break supportsd.
IF itab2 IS INITIAL.
SELECT bednr FROM zbednr INTO TABLE itab2.
ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
*     DDIC_STRUCTURE         = ' '
retfield               =
'BEDNR'
*     PVALKEY                = ' '
dynpprog               = sy-repid
dynpnr                 = sy-dynnr
dynprofield            =
'TRAK_ID'
value_org              =
'S'
TABLES
value_tab              = itab2

.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.


LOOP AT SCREEN.
IF screen-group1 = 'BBB'.
screen-input =
0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

Thanks All

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,595

Hi

Then you need to use RETURN_TAB parameter in TABLES parameter in FM.

regards.

laxman

Hi all,

   I had used the above function module in my code.It was working fine but after upgradation from ehp5 to ehp 6 ,its not working any more.Need your help to resolve this issue. here is my code:

      SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text1.
PARAMETERS: rb1
RADIOBUTTON GROUP grp1   DEFAULT 'X' USER-COMMAND uc.
PARAMETERS : rb2 RADIOBUTTON GROUP grp1.
SELECTION-SCREEN END OF BLOCK b.


SELECTION-SCREEN  BEGIN OF BLOCK b1 WITH FRAME TITLE text.
*PARAMETERS : s_matnr LIKE mara-matnr   MODIF ID aaa .
SELECT-OPTIONS : s_matnr FOR mara-matnr   MODIF ID aaa .
SELECT-OPTIONS :   s_plant FOR eban-werks   MODIF ID aaa.
PARAMETERS : s_req LIKE eban-afnam  MODIF ID aaa.
*PARAMETERS : pr_qty LIKE  eban-menge  MODIF ID aaa.
PARAMETERS: trak_id
LIKE zbednr-bednr MODIF ID bbb,
*            ved TYPE  marc-loggr,
token_no
LIKE zjust_format-tokenno  MODIF ID aaa.
SELECT-OPTIONS :   aprvd_dt FOR zjust_format-date1.
*PARAMETERS: s_budat LIKE s031-sptag DEFAULT sy-datum.
SELECTION-SCREEN  END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2.
PARAMETERS: c1
AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b2.
*
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rb1 = 'X' AND c1 =  ' ' .
IF screen-group1 = 'AAA'.
screen-active =
1.
MODIFY SCREEN.
ENDIF.
ENDIF.

IF rb2 = 'X' AND c1 = ' '.
IF screen-group1 = 'AAA'.
screen-active =
0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.

LOOP AT SCREEN .
IF screen-group1 = 'BBB'.
screen-input =
0 .
MODIFY SCREEN .
ENDIF.
ENDLOOP.
set CURSOR field 'TOKEN_NO'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR trak_id.
LOOP AT SCREEN.
IF screen-group1 = 'BBB'.
screen-input =
1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*break supportsd.
IF itab2 IS INITIAL.
SELECT bednr FROM zbednr INTO TABLE itab2.
ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
*     DDIC_STRUCTURE         = ' '
retfield               =
'BEDNR'
*     PVALKEY                = ' '
dynpprog               = sy-repid
dynpnr                 = sy-dynnr
dynprofield            =
'TRAK_ID'
value_org              =
'S'
TABLES
value_tab              = itab2

.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.


LOOP AT SCREEN.
IF screen-group1 = 'BBB'.
screen-input =
0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

Thanks All

9 REPLIES 9
Read only

Former Member
0 Likes
2,595

Hi Subhadip ,

Are you getting any error while executing this after the upgrade ?

Read only

0 Likes
2,595

yes only after  upgrade .

Read only

0 Likes
2,595

Can you describe the error message ?

Read only

0 Likes
2,595

I am not getting any error message. but the selected value is not populating from the hit list.

Read only

0 Likes
2,595

Try,

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
*     DDIC_STRUCTURE         = ' '
retfield               =
'BEDNR'
*     PVALKEY                = ' '
dynpprog               = sy-cprog
dynpnr                 = sy-dynnr
dynprofield            =
'TRAK_ID'
value_org              =
'S'
TABLES
value_tab              = itab2

return_tab                = gt_return

.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.


If you still don't get the values in the desired field, use the following code.


READ TABLE gt_return INTO wa_return INDEX 1.

   CHECK sy-subrc = 0.

   READ TABLE itab2 WITH KEY bednr = wa_return-fieldval.

   CHECK sy-subrc = 0.

   TRAK_ID = wa_return-fieldval.



Regards,

Mayur Priyan. S

Read only

Former Member
0 Likes
2,596

Hi

Then you need to use RETURN_TAB parameter in TABLES parameter in FM.

regards.

laxman

Read only

0 Likes
2,595

Thanx. Its working now.

Read only

former_member188827
Active Contributor
0 Likes
2,595

try using sy-cprog instead of sy-repid and see if it works.

Regards

Read only

himanshu_gupta13
Product and Topic Expert
Product and Topic Expert
0 Likes
2,595

Try to provide C instead of S for value_org.


May it will resolve your issue.


Many thanks / Himanshu Gupta