Application Development 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: 

F4 Help for Document Number

Former Member
0 Kudos

Hi Experts,

I am using document number( BSIK-BELNR ) in my report's selection screen. I couldn't get any F4 Help for that field. Could someone help it out..

Regards,

Swetha

14 REPLIES 14

keyur_pawar
Active Participant
0 Kudos

If you brows BSIK table, then there is no F4 available for BELNR field.

that's why F4 is not reflected on your selection screen.

Regards,

KP

0 Kudos

Hi Mr.

alok_patra
Participant
0 Kudos

Hi Swetha,

You need to write code for this :-(. 

Use FM F4IF_INT_TABLE_VALUE_REQUEST to create a customized F4  help.

Thanks,

Alok

0 Kudos

0 Kudos

Try FCO_BELNR_READ.

0 Kudos

Wait a minute ...

Swetha, do you see the F4 help you are missing at any other place in the system?

BSIK-BELNR has data element BELNR_D. If I push "Where-used in F4 helps" for this data type, I get the following list.

You can test the functionality of these search helps in SE11, -> Search Help -> Button "Test..."

If you find one that fits your need, you can attach its ID to your report parameter or select-option with the ammendment "MATCHCODE OBJECT <search_help>", where <search_help> is the DDIC name, with no quotation marks.

Regards,

Rüdiger

Search helpShort description
/SAPNEA/J_SC_DEDUCTIBLE_AP_DOCDeductible A/P document search help
CREDIT_CARD_DOCUMENT_SHLPPayment Card Documents that can be Reversed
FIN_FSSC_SH_SDINVSearch help SD Invoice
FMCJ_FI_REFERENCE_DEBISearch Help to Determine Open Item for Cash Desk
FMCJ_FI_REFERENCE_KREDISearch Help to Determine Open Item for Cash Desk
FMFGIPACED_SHLPIPACed search help
FMFG_REFERENCE_NUMBERSearch using reference number
FMKK_F4_AUGBLSearch Help for Clearing Document Number
FMKK_F4_BELNRDocument Number Search Help
H_VBKPFParked Documents Help View
J_1IEWT_CHALLANSearch help for J_1IEWTCHLN table to get clearing docs no
J_1I_GAR7GAR7 Search help for Internal challan number
J_3RFTSE_SHPSearch help for secondary documents from J_3RTSE table
J_3R_SH_SALE_BOOKSearch help for sale book
MEBZFDelivery Costs for Bill of Lading
MEBZXDelivery Costs per Vendor/External Document Number
OIAMAFees per vendor
OIAMCFees per contract (outline agreement)
OIAMDFees per external delivery note
OIAMEFees per bill of lading
REXCFC_BELNRFind Documents Using RE Account Assignment
VF_BKPFSearch help for billing documents via FI data

0 Kudos

Hi,

I tested "FMKK_F4_BELNR" & found suitable for the requirement.

Former Member
0 Kudos

Hi,

If you want to get list of BSIK documents, then please go with FM F4IF_INT_TABLE_VALUE_REQUEST...

Advantage is: You can fetch documents from BSIK table as per your requirement/Conditions....

Regards,

Rajesh Sadula.

0 Kudos

Rajesh. As a programmer, you always have the full freedom. I just want to point to the following part of the documentation of the function module F4IF_INT_TABLE_VALUE_REQUEST you recommended. For this reason, I asked Swetha to look for existing F4 helps, first.

It's bold in original

Note: Before you use this module at POV (Process on Value-Request),
reconsider whether a search help could not carry out the same task. (...) The F4 help is  automatically available for all users of the data element or structure.

0 Kudos

Hi Rudiger,

I completely agree with you, the above BOLD words are absolutely correct....

We have to use FM F4IF_INT_TABLE_VALUE_REQUEST only when we have custom conditions i.e no standard/existing search help available for our requirement.

Regards,

Rajesh Sadula.

keyur_pawar
Active Participant
0 Kudos

Try this code,......

***************************************************************************

REPORT  ZBELNR.

tables : BSIK.
types: begin of s_itab,
     belnr type BELNR_D,
   end of s_itab.

   data : itab type table of s_itab.

selection-screen begin of block b1.
parameters : belnr type BSIK-BELNR.
selection-screen end of block b1.


at selection-screen on value-request for belnr.
select belnr from BSIK into table ITAB.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
             retfield        = 'BELNR'
             dynpprog        = sy-repid
             dynpnr          = '1000'
             dynprofield     =  'BSIK-BELNR'  "'T_SERIAL-INFO'
*            stepl           = lv_stepl
             value_org       = 'S'
           tables
             value_tab       = itab
           exceptions
             parameter_error = 1
             no_values_found = 2
             others          = 3.
         if sy-subrc ne 0.
           message id sy-msgid type sy-msgty number sy-msgno
                   with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         endif.

sapient_abaper
Explorer
0 Kudos

Types : begin of zbelnr,

                       belnr type bsik-belnr,

            end of zbelnr.

DATA :   p_retfield    TYPE dfies-fieldname
             pt_shelp      TYPE STANDARD TABLE Zbelnr_ds
            

            return_values TYPE STANDARD TABLE Zbelnr_ds

           p_subrc       TYPE sy-subrc .

   DATA : lt_return_values  TYPE STANDARD TABLE OF ddshretval,
         ls_return_values  LIKE LINE OF lt_return_values,
         lv_belnr          TYPE bsik-belnr,
         lv_subrc          TYPE sy-subrc.

   AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_belnr-low.
  PERFORM get_belnr_f4_help.

*&---------------------------------------------------------------------*
*&      Form  GET_BELNR_F4_HELP
*&---------------------------------------------------------------------*
FORM get_belnr_f4_help.

   SELECT BELNR from BSIK   INTO TABLE lt_belnr_f4_help.
  IF sy-subrc = 0.
    SORT lt_belnr_f4_help BY belnr ASCENDING.
    DELETE ADJACENT DUPLICATES FROM pt_belnr_f4_help COMPARING ALL FIELDS.
  ENDIF.

   IF lt_belnr_f4_help[] IS NOT INITIAL.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = p_retfield
      value_org       = 'S'
      multiple_choice = 'X'
    TABLES
      value_tab       = pt_shelp[]
      return_tab      = return_values
    EXCEPTIONS
      parameter_error = 1
      no_values_found = 2
      OTHERS          = 3.
  IF sy-subrc <> 0.
    p_subrc = sy-subrc.
  ENDIF.

IF lv_subrc = 0.
      LOOP AT lt_return_values INTO ls_return_values.
        IF sy-subrc = 0.
          lv_belnr = ls_return_values-fieldval.
          CLEAR   s_belnr.
*          REFRESH s_belnr.
          s_belnr-sign   = 'I'.
          s_belnr-option = 'EQ'.
          s_belnr-low    = lv_belnr.
          APPEND s_belnr.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.

   ENDFORM.                    " GET_BELNR_F4_HELP

Former Member
0 Kudos

hi Sweta,

There is a function module to get F4 help on selection screen for those fields which does not have search help of value help or check table attached to it.

   REPORT  ZTEST_RAJ.

TABLES: bsik.

TYPES: BEGIN OF ty_value_tab,
         belnr  TYPE bsik-belnr,
       END OF ty_value_tab.

DATA: lt_value_tab  TYPE STANDARD TABLE OF ty_value_tab,
      lt_return     TYPE STANDARD TABLE OF ddshretval.

PARAMETERS p_belnr  TYPE bsik-belnr.



AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_belnr.
SELECT belnr
  FROM bsik
  INTO TABLE lt_value_tab.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD               = 'BELNR'
      DYNPPROG               = sy-cprog
      DYNPNR                 = sy-dynnr
      VALUE_ORG              = 'S'
    TABLES
      VALUE_TAB              = lt_value_tab[]
      RETURN_TAB             = lt_return
   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.

0 Kudos

Use Function Module for F4IF_INT_TABLE_VALUE_REQUEST or create a Search Help through SE11 and add it