FM for F4 help for dialog program

  1. This f4 help for customer based on some logic
PROCESS BEFORE OUTPUT.

PROCESS AFTER INPUT.

PROCESS ON VALUE-REQUEST.
 FIELD: g_tab-KUNNR MODULE f4_kunnr. "Customer
Types :
*Cutomer details
BEGIN OF ty_kunnr,
  kunnr TYPE kunnr,
  name2 TYPE char20,
  name3 TYPE char20,
END OF ty_kunnr,

Data:
  g_t_kunnr             TYPE  STANDARD TABLE OF ty_kunnr,
  REFRESH  g_t_kunnr.
  SELECT a~KUNN2"Customer number of business partner
         b~NAME2"Customer department
         B~NAME3"Contracting Party
     from KNVP as a
      INNER JOIN kna1 as b
    on a~kunn2 = b~kunnr
    INTO TABLE g_t_kunnr
      WHERE VKORG like '100%'
        and PARVW = 'RE'."Bill to party
  IF sy-subrc = 0.
    SORT g_t_kunnr  by kunnr.
  ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield         = 'KUNNR'"Field from Table g_t_kunnr
      dynpprog         = sy-repid
      dynpnr           = sy-dynnr
      DYNPROFIELD      = 'KUNNR' Screen field for the dilog program 
      value_org        = g_c_s
      callback_program = sy-repid
      callback_form    = space
    TABLES
      value_tab        = g_t_kunnr Any type of table 
      return_tab       = g_t_return_val
    EXCEPTIONS
      parameter_error  = 1
      no_values_found  = 2
      OTHERS           = 3.

No comments:

Post a Comment

/*Newer Post*/ Older Post Home