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

F4IF_INT_TABLE_VALUE_REQUEST value_tab cleared

Former Member
0 Likes
1,040

Hi all,

i'm using the bapi in object.

I use it in a table control.

It runs well when i start it for the first time.

If i open the match code for the second field the value_tab is displayed with initial values:

1st time: SRVPOS KTEXT1

1 descr1

2 descr2... ecc

2nd time KTEXT1 KTEXT1

0000000 descr1

0000000 descr2... ecc

The header too is not correct.

Anybody can help me?

Thanks.

-


MY CODE----

DATA: field_tab LIKE dfies OCCURS 0 WITH HEADER LINE.

DATA: return_tab TYPE ddshretval OCCURS 0 WITH HEADER LINE.

* DATA: BEGIN OF value_tab OCCURS 0,

* srvpos like esll-srvpos,

* ktext1 like esll-ktext1,

* END OF value_tab.

DATA: value_tab LIKE esll OCCURS 0 WITH HEADER LINE.

CLEAR: value_tab, return_tab.

REFRESH value_tab[].

REFRESH field_tab[].

REFRESH return_tab[].

field_tab-fieldname = 'SRVPOS'.

field_tab-tabname = 'ESLL'.

field_tab-offset = '18'.

field_tab-position = '1'.

field_tab-keyflag = 'X'.

field_tab-intlen = 15.

field_tab-leng = 15.

field_tab-outputlen = 15.

field_tab-scrtext_m = 'Prestazione'.

APPEND field_tab.

CLEAR field_tab.

field_tab-fieldname = 'KTEXT1'.

field_tab-tabname = 'ESLL'.

field_tab-position = '2'.

field_tab-offset = '40'.

field_tab-intlen = 15.

field_tab-leng = 15.

field_tab-outputlen = 15.

field_tab-scrtext_m = 'Descrizione'.

APPEND field_tab.

CLEAR field_tab.

DATA: check_fieldval LIKE return_tab-fieldval.

LOOP AT tadd.

MOVE-CORRESPONDING tadd TO value_tab.

APPEND value_tab.

CLEAR value_tab.

ENDLOOP.

CLEAR tadd.

SORT value_tab.

DELETE ADJACENT DUPLICATES FROM value_tab.

*****

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'SRVPOS'

value_org = 'S'

dynpprog = sy-repid

dynpnr = sy-dynnr

TABLES

value_tab = value_tab

field_tab = field_tab

return_tab = return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc = 0.

wins-srvpos = return_tab-fieldval.

ENDIF.

Edited by: SAPDUMMY on Feb 9, 2011 12:38 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
805

check tadd table has value at second time

6 REPLIES 6
Read only

Former Member
0 Likes
806

check tadd table has value at second time

Read only

0 Likes
805

Thanks for your reply... did it. It's full.

Edited by: SAPDUMMY on Feb 9, 2011 3:10 PM

Read only

0 Likes
805

Anibody can help me?

Read only

0 Likes
805

Hi,

Why can not you standard bapi BAPI_HELPVALUES_GET.

Regards,

Madhu.

Read only

Former Member
0 Likes
805

Hi,

Declare another value tab for the second field ...

DATA: value_tab1 LIKE esll OCCURS 0 WITH HEADER LINE.

DATA: value_tab2 LIKE esll OCCURS 0 WITH HEADER LINE.

Also both the times the return field is SRVPOS ... for the second change the return field ....

Regards,

Srini.

Read only

0 Likes
805

Thank you very much for your ansewers.

I solved the problem.

The problem was about the header of internal table fields_tab.

After first use of the match code the fields_tab's header was dirty.

has been enough to clean it.

Thank you again.