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

error in search help+module pool

former_member397321
Participant
0 Likes
4,026

Hi experts,

I have called this function, 'F4IF_INT_TABLE_VALUE_REQUEST' in my module pool program, and i found this error:   ASSIGN_LENGTH_0

I called the function in module init of PBO.

field in the screen painter is called: it_zcc02_bankl.

FORM shp_agenc  USING    p_it_zcc02_bankl.

  DATA: BEGIN OF fldtab1 OCCURS 2.

          INCLUDE STRUCTURE help_value.

  DATA: END OF fldtab1.

  DATA: BEGIN OF it_shpag00 OCCURS 0,

      inst_inst TYPE ztcelagen-inst_inst,

      agen_agen TYPE ztcelagen-agen_agen,

      tpin_tpin TYPE ztcelagen-tpin_tpin,

      agen_noag TYPE ztcelagen-agen_noag,

  •      inst_noin  TYPE ztcelinst-inst_noin,

      inst_sigl TYPE ztcelinst-inst_sigl,

END OF it_shpag00.

  DATA: BEGIN OF itab1 OCCURS 0,

   bankl TYPE bnka-bankl,

  •   inst_noin TYPE bnka-banka,

    inst_sigl TYPE ztcelinst-inst_sigl,

   agen_noag TYPE ztcelagen-agen_noag,

  END OF itab1.

  DATA: wa_ihelp_fields LIKE LINE  OF fldtab1,

          it_field_tab    TYPE TABLE OF dfies,

          wa_field_tab    TYPE dfies,

          it_return_tab   TYPE TABLE OF ddshretval,

          wa_return_tab   TYPE ddshretval.

  DATA: BEGIN OF txttab1 OCCURS 30,

          text LIKE t053-langt,

        END OF txttab1.

*

  • DATA: BEGIN OF itab1 OCCURS 50,

  •          labor LIKE t024x-labor,

  •          lbtxt LIKE t024x-lbtxt,

  •        END OF itab1.

  DATA: ok-code1(4).

  REFRESH:it_field_tab,

          it_return_tab.

  GET PARAMETER ID 'OKC' FIELD ok-code1.

  rfcu3-xshow = space.

  REFRESH: fldtab1, txttab1, itab1.

  fldtab1-tabname    = 'itab1'.

  fldtab1-fieldname  = 'bankl'.

  fldtab1-selectflag = 'X'.

  APPEND fldtab1.

  fldtab1-tabname    = 'itab1'.

  fldtab1-fieldname  = 'INST_SIGL'.

  fldtab1-selectflag = ''.

  APPEND fldtab1.

  fldtab1-tabname    = 'itab1'.

  fldtab1-fieldname  = 'agen_noag'.

  fldtab1-selectflag = ''.

  APPEND fldtab1.

  SELECT a~inst_inst

           a~agen_agen

           a~tpin_tpin

           a~agen_noag

  •           b~inst_noin

           b~inst_sigl

           INTO CORRESPONDING FIELDS OF  it_shpag00

           FROM ztcelagen AS a INNER JOIN ztcelinst AS b

      ON

      ( ainst_inst = binst_inst ).

  •    WHERE ainst_inst = bINST_NOIN.

  •    order by inst_inst.

    APPEND it_shpag00.

  ENDSELECT.

  LOOP AT it_shpag00.

    CONCATENATE it_shpag00-inst_inst it_shpag00-tpin_tpin it_shpag00-agen_agen  INTO itab1-bankl.

    MOVE: it_shpag00-agen_noag TO itab1-agen_noag,

  •          it_shpag00-inst_noin TO itab1-inst_noin.

          it_shpag00-inst_sigl TO it_shpag00-inst_sigl.

    APPEND itab1.

  ENDLOOP.

  LOOP AT itab1.

    txttab1-text = itab1-bankl.

    APPEND txttab1.

    txttab1-text = itab1-inst_sigl.

    APPEND txttab1.

    txttab1-text = itab1-agen_noag.

    APPEND txttab1.

  ENDLOOP.

  LOOP AT fldtab1 INTO wa_ihelp_fields.

    wa_field_tab-tabname   = wa_ihelp_fields-tabname.

    wa_field_tab-fieldname = wa_ihelp_fields-fieldname.

    wa_field_tab-keyflag   = wa_ihelp_fields-selectflag.

    APPEND wa_field_tab TO it_field_tab.

    CLEAR wa_field_tab.

    CLEAR wa_ihelp_fields.

  ENDLOOP.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

      display         = rfcu3-xshow

      retfield        = 'bankl'

      dynpprog        = 'ZTRDCCHQ'

      dynpnr          = '0201'

      dynprofield     = 'itab1'

    TABLES

      value_tab       = txttab1

      field_tab       = it_field_tab

      return_tab      = it_return_tab

    EXCEPTIONS

      parameter_error = 1

      no_values_found = 2

      OTHERS          = 3.

  IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  ENDIF.

  LOOP AT it_return_tab INTO wa_return_tab.

    p_it_zcc02_bankl = wa_return_tab-fieldval.

    EXIT.

  ENDLOOP.

ENDFORM.                    " SHP_AGENC

many thanks.

25 REPLIES 25
Read only

former_member397321
Participant
0 Likes
3,962

Hi experts,

can any one give me a help

many thanks

Read only

former_member397321
Participant
0 Likes
3,962

Where I have to call the function above in  a module pool program, in module PBO or in PAI. I put it in init of PBO

F4IF_INT_TABLE_VALUE_REQUEST

Read only

Former Member
0 Likes
3,962

HI

You need to cal FM in POV (PROCESS ON VALUE REQUEST).

you need to seperate event for F4.

regards

laxman

Read only

0 Likes
3,962

This message was moderated.

Read only

0 Likes
3,962

Hi Elina,

     It needs to be written in the PAI include.

Thanks & regards,

Bharat

Read only

former_member397321
Participant
0 Likes
3,962

So where I have to implement the form which calls the function. I'm askink it becouse The PBO; PAI has especific Include in the program.

So POV appears before PBO, is that?

Read only

0 Likes
3,962

Hi,

Before calling FM F4IF_INT_TABLE_VALUE_REQUEST  you need to call 'DYNP_VALUES_READ' FM to get input fields.

Thanks,

Sree

Read only

0 Likes
3,962

Hi

write down pov after PAI event.

POV routines comes in PAI include.

i think no need of DYNP_VALUES_READ Fm in module pool that requires in REPORT program @ Polu Sreedevi

regards

laxman

Read only

0 Likes
3,962

You can check out this thread as well if you are still not clear.

These as well

Read only

former_member397321
Participant
0 Likes
3,962

Hi experts many thanks I have made a progress,

The error doesn't appear.... so  when I called the function, in the Tables section I have the return table as you can see, it_return_tab, doesn't have values, and the  Search Help doesn't show value

  field_tab   = it_field_tab
  return_tab 

= it_return_tab

Read only

former_member397321
Participant
0 Likes
3,962

HI EXPERTS,

WHAT CAN I DO FOR THE VALUES OF MY SEARCH HELP ITAB APPEARS IN THE SCREEN.

I LOOK FORWARD TO HEARING FROM YOU.

Read only

0 Likes
3,962

once try press enter fist and press f4.

Read only

0 Likes
3,962

TRY THIS,

CODE ON SCREEN.

PROCESS ON VALUE-REQUEST.

   FIELD it_zcc02_bankl MODULE SHOW_SHP.

 

   CODE IN MODULE SHOW_SHP

    ****  FIRST GET DATA********

    free field_tbl.

   field_tbl-tabname    = "TABLE NAME.

   field_tbl-fieldname  = "FIELD NAME.

   field_tbl-selectflag = 'X'.

   append field_tbl.

   call function 'HELP_VALUES_GET_WITH_TABLE'              

     exporting

       show_all_values_at_first_time = 'X'

     importing

       select_value                  = select_value

     tables

       fields                        = field_tbl

       valuetab                      = ITAB

     exceptions

       others                        = 99.

   if sy-subrc eq 0.

     it_zcc02_bankl = select_value.

   endif.

Read only

former_member397321
Participant
0 Likes
3,962

OTHER INFORMATION IS THAT, THE ITAB I GAVE AS A PARAMETER TO THE FUNCTION HA VALUE, IT IS 1280 RECORDS, AND THIS TOTAL OF VALUES IS SHOWN IN THE SEARCH HELP BUT VALUE DOESN'T APPEAR.

KIND REGARDS

Read only

former_member397321
Participant
0 Likes
3,962

I have presssed F4 boton and enter the value isn't shown

Read only

former_member397321
Participant
0 Likes
3,962

have a look of what I'm saying:

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

      display         = rfcu3-xshow

      retfield        = 'bankl'

*      dynpprog        = 'ZTRDCCHQ'

*      dynpnr          = '0201'

*      dynprofield     = 'it_zcc02-bankl'(014)

      value_org = 'S'

    TABLES

      value_tab       = txttab1

      field_tab       = it_field_tab

      return_tab      = it_return_tab

    EXCEPTIONS

      parameter_error = 1

      no_values_found = 2

      OTHERS          = 3.

  IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  ENDIF.

  LOOP AT it_return_tab INTO wa_return_tab.

    p_it_zcc02_bankl = wa_return_tab-fieldval.

    EXIT.

  ENDLOOP.

my field is p_it_zcc02_bankl, my

value_tab   = txttab1

has a value before I call the function

Read only

0 Likes
3,962

you shoudl press enter before F4,

and check in the debugging whether that internal table having any data or not.

Read only

former_member397321
Participant
0 Likes
3,962

Hi, are you there?

kind regards

Read only

former_member397321
Participant
0 Likes
3,962

Hi experts,

I have pressed and the internal table I'm passing in the function has a value- 1280 records but it isn't shown in the screen

why?

kind regards

Read only

0 Likes
3,962

you shoudl press enter before F4,

and check in the debugging whether that internal table which you are passing to function having any data or not.

Read only

former_member397321
Participant
0 Likes
3,962

Expert Laxman,

as I have wrote, the internal table has values about 1280 records, and I can see it in the debug, but values doesn't appear in the screen,

why

Read only

former_member397321
Participant
0 Likes
3,962

Hi experts,

That is the step where I am.

I have debugged the program and the itab I have passed by the parameter value_tab of the function has values- about 1280 records.

When I press F4, itab or tab appears in the screen but I can't see the in the bottom of the tab there are information which says 1280 records was selected,

My doubt is, why the I can't see the values of the itab or tab of F4 in the screen?

I will be thankful if anyone could help

Read only

former_member397321
Participant
0 Likes
3,962

Is it the code below corect:

fldtab1-tabname= 'itab1'.

  fldtab1-fieldname  = 'CHAVE'.

  fldtab1-selectflag = 'X'.

  APPEND fldtab1.

I have filled fldtab1-tabname with itab and not transparent table name

kind regards

Read only

former_member397321
Participant
0 Likes
3,962

Tell me who could help,

Does the field on the screen need to be any field of a transparent table or it should be an internal table field.

kind regard

Read only

former_member397321
Participant
0 Likes
3,962

Hi experts,

I get the solution by changing values of tabname and fieldname, giving values of transparent table in both.

fldtab1-tabname= 'bnka'.

  fldtab1-fieldname  = 'bnkl'.

  fldtab1-selectflag = 'X'.

  APPEND fldtab1

I was giving values of the internal table.