Left Outer Joins

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 16
At a glance
Powered by AI
The document discusses importing and filtering data from MB51 using ABAP forms and submitting a program called rm07docs. It contains technical details about local variable declarations, form definitions, and field catalog appends.

The document is describing how to import data from MB51 using ABAP forms and filter that data based on selection screen values. It contains the ABAP code to define forms, variables, and submit a program to import the data.

The document contains ABAP code for local variable declarations, form definitions, field catalog appends, and the logic for importing data from MB51, filtering it, and appending it to a field catalog. It includes details like flag settings, memory IDs, table definitions and more.

*----------------------------------------------------------------------

*CONFIDENTIAL AND PROPRIETARY


*COPYRIGHT 2015, QATAR PETROCHEMICALS PROJECT
*ALL RIGHTS RESERVED
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
* PROGRAM NAME :ZPPRO_PP_R_0022_RM07DOCS_FRM
* CREATED BY :Pankaj Kumar
* CREATION DATE :2015-11-05
* DER NUMBER :PP_R_0022
* TRANSPORT NUMBER :DERK901475
* DESCRIPTION : Material Document List Based Reporting and
* Controlled Update
*----------------------------------------------------------------------*
* REVISION HISTORY-----------------------------------------------------*
* REFERENCE TYPE: <DER OR TPR OR SCR>
* REFERENCE NO:
* CHANGED BY:
* CHANGE DATE: YYYY-MM-DD
* TRANSPORT NUMBER:
* DESCRIPTION:
*----------------------------------------------------------------------*

*&---------------------------------------------------------------------*
*& Include ZPPRO_PP_R_0022_RM07DOCS_FRM
*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*
*& Form F_DATA_SELECTION
*&---------------------------------------------------------------------*
* Import Data from MB51 for given values in Selection screen
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_data_selection .
*--------------------------------------------------------------------*
* Local Variable Declaration
*--------------------------------------------------------------------*
CONSTANTS : lc_flag(9) TYPE c VALUE 'MB51_FLAG', " Flag(9) of type
Character
lc_memid(16) TYPE c VALUE 'MB51_EXPORT_LIST'. " Memid(16) of type
Character

*--------------------------------------------------------------------*
* Local Variable Declaration
*--------------------------------------------------------------------*
DATA : flag TYPE char1. "To import list from MB51

*--------------------------------------------------------------------*
* Local table Declaration
*--------------------------------------------------------------------*
* This table is to export value from mb51. The name shd be same as that of MB51
DATA : export_list TYPE STANDARD TABLE OF ty_export_list INITIAL SIZE 0.

* Set this value for data to be exported from mb51


flag = abap_true.

* Set Falg to True


EXPORT flag TO MEMORY ID lc_flag.

* There is a export statement inside MB51, which is invoked on flag being set.

SUBMIT rm07docs "#EC CI_SUBMIT


AND RETURN
EXPORTING LIST TO MEMORY
WITH bwart IN s_bwart
WITH werks IN s_werks
* WITH wempf IN s_wempf
WITH vgart IN s_vgart
WITH budat IN s_budat.

* Import value from MB51


IMPORT export_list FROM MEMORY ID lc_memid.

FREE MEMORY ID lc_memid.

IF export_list[] IS NOT INITIAL.


IF rb_ernam = abap_true. "PR Creator
PERFORM f_filter_pr_creator USING export_list.
ELSEIF rb_dispo = abap_true. " MRP Controller
PERFORM f_filter_mrp_controller USING export_list.
ENDIF. " IF rb_ernam = abap_true
ELSE. " ELSE -> IF export_list[] IS NOT INITIAL
flg_error = c_error.
ENDIF. " IF export_list[] IS NOT INITIAL

FREE export_list[].

ENDFORM.

*&---------------------------------------------------------------------*
*& Form F_VALIDATION
*&---------------------------------------------------------------------*
* Check to see if PR Creator or MRP Controller is entered
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_validation .
* PR Creator Name Validation
IF rb_ernam = abap_true.
IF s_wempf IS INITIAL.
flg_error = abap_true.
MESSAGE s025(zpp_msg) DISPLAY LIKE c_error. " Please provide PR Creator
details
LEAVE LIST-PROCESSING.
ENDIF. " IF s_wempf IS INITIAL
ELSEIF rb_dispo = abap_true.
* MRP Controller Validation
IF s_dispo IS INITIAL.
flg_error = abap_true.
MESSAGE s024(zpp_msg) DISPLAY LIKE c_error. " Please provide MRP Controller
Details
LEAVE LIST-PROCESSING.
ENDIF. " IF s_dispo IS INITIAL
ENDIF. " IF rb_ernam = abap_true
ENDFORM.
*&---------------------------------------------------------------------*
*& Form F_FILTER_PR_CREATOR
*&---------------------------------------------------------------------*
* Fetch data from MSEG and related tables for MB51 data
*----------------------------------------------------------------------*
* -->fP_EXPORT_LIST table type of export list
*----------------------------------------------------------------------*
FORM f_filter_pr_creator USING fp_export_list TYPE ty_t_export_list.

*--------------------------------------------------------------------*
* Local Constant Declaration
*--------------------------------------------------------------------*
CONSTANTS : lc_tcode TYPE rvari_vnam VALUE 'TCODE'. " ABAP: Name of Variant
Variable

*--------------------------------------------------------------------*
* Local table Declaration
*--------------------------------------------------------------------*
DATA : li_vnames TYPE zat_vname_tt, " ABAP: Name of Variant Variable
li_ranges TYPE zat_vname_range_tt.
*--------------------------------------------------------------------*
* Local Variable Declaration
*--------------------------------------------------------------------*
DATA : l_pname TYPE progname, " ABAP Program Name
lr_val TYPE zat_selopt_tt. "Range for Material Type maintained in
ZAT_CONSTANT

*--------------------------------------------------------------------*
* Local Field Symbols Declaration
*--------------------------------------------------------------------*
FIELD-SYMBOLS : <lfs_ranges> TYPE zat_vname_range. "Range Str

* Set Report Id
l_pname = sy-repid.
APPEND lc_tcode TO li_vnames.

*Calling class to fetch constants


CALL METHOD zclat_constants=>get_constants_as_range
EXPORTING
i_pname = l_pname
it_vname = li_vnames
IMPORTING
et_const_ranges = li_ranges.

* Fetch data from Range


READ TABLE li_ranges ASSIGNING <lfs_ranges> INDEX 1.
IF sy-subrc = 0 AND <lfs_ranges> IS ASSIGNED.
lr_val = <lfs_ranges>-val_range.
ENDIF. " IF sy-subrc = 0 AND <lfs_ranges> IS ASSIGNED

IF fp_export_list IS NOT INITIAL.

SELECT
mseg~ablad , " Unloading Point
mseg~anln1 , " Main Asset Number
mseg~anln2 , " Asset Subnumber
mseg~aplzl , " Internal counter
mseg~aufnr , " Order Number
mseg~aufpl , " Routing number of operations in the order
mkpf~bktxt , " Document Header Text
mkpf~bldat , " Document Date in Document
mseg~bpmng , " Quantity in Purchase Order Price Unit
mseg~bprme , " Order Price Unit (Purchasing)
mseg~bstme , " Purchase Order Unit of Measure
mseg~bstmg , " Goods receipt quantity in order unit
mkpf~budat , " Posting Date in the Document
mseg~budat_mkpf, " Posting Date in the Document
mseg~bukrs , " Company Code
mseg~bwart , " Movement Type (Inventory Management)
mseg~bwlvs , " Movement Type for Warehouse Management
mseg~bwtar , " Valuation Type
mseg~charg , " Batch Number
mkpf~cpudt , " Day On Which Accounting Document Was Entered
mseg~cpudt_mkpf , " Day On Which Accounting Document Was Entered
mkpf~cputm , " Time of Entry
mseg~cputm_mkpf , " Time of Entry
mseg~dmbtr , " Amount in Local Currency
mseg~ebeln , " Purchase Order Number
mseg~ebelp , " Item Number of Purchasing Document
mseg~erfme , " Unit of Entry
mseg~erfmg , " Quantity in Unit of Entry
mseg~exbwr , " Externally Entered Posting Amount in Local Currency
mseg~exvkw , " Externally Entered Sales Value in Local Currency
mkpf~frbnr , " Number of Bill of Lading at Time of Goods Receipt
mseg~grund , " Reason for Movement
mseg~kdauf , " Sales Order Number
mseg~kdein , " Delivery Schedule for Sales Order
mseg~kdpos , " Item Number in Sales Order
mseg~kostl , " Cost Center
mseg~kunnr , " Customer
mseg~kzbew , " Movement Indicator
mseg~kzvbr , " Consumption Posting
mseg~kzzug , " Receipt Indicator
mseg~lfbnr , " Document No. of a Reference Document
mseg~lgnum , " Warehouse Number / Warehouse Complex
mseg~lgort , " Storage Location
mseg~lgtyp , " Storage Type
mseg~lifnr , " Desired Vendor
mseg~llief , " Supplying Vendor
mseg~matnr , " Material Number
mseg~mat_kdauf , " Sales Order Number of Valuated Sales Order Stock
mseg~mat_kdpos , " Sales Order Item of Valuated Sales Order Stock
mkpf~mblnr , " Number of Material Document
mseg~meins , " Purchase Requisition Unit of Measure
mseg~menge , " Purchase Requisition Quantity
mkpf~mjahr , " Material Document Year
mseg~nplnr , " Network Number for Account Assignment
mseg~ps_psp_pnr, " Work Breakdown Structure Element (WBS Element)
mseg~rsnum , " Number of Reservation/Dependent Requirement
mseg~rspos , " Item Number of Reservation/Dependent Requirement
mseg~sakto , " G/L Account Number
mseg~shkzg , " Debit/Credit Indicator
mseg~sobkz , " Special Stock Indicator
mseg~tbnum , " Transfer Requirement Number
mkpf~tcode2 , " Transaction Code
mseg~tcode2_mkpf, " Transaction Code
mkpf~usnam , " User name
mseg~usnam_mkpf , " User name
mkpf~vgart , " Transaction/Event Type
mseg~vgart_mkpf , " Transaction/Event Type
mseg~vkwrt , " Value at Sales Prices Including Value-Added Tax
mseg~waers , " Currency Key
mseg~wempf , " Goods Recipient/Ship-To Party
mseg~werks , " Plant
mkpf~xabln , " Goods Receipt/Issue Slip Number
mseg~xauto , " Item automatically created
mkpf~xblnr , " Reference Document Number
mseg~xblnr_mkpf , " Reference Document Number
mseg~zeile , " Item in Material Document
mseg~maa_urzei , " Original Line for Account Assignment Item in Material
Doc.
mseg~xmacc , " Multiple Account Assignment
makt~maktx , " Material Description (Short Text)
ekpo~meins , " Purchase Requisition Unit of Measure
ekpo~pstyp , " Item Category in Purchasing Document
ekpo~vrtkz , " Distribution indicator for multiple account assignment
ekpo~twrkz , " Partial Invoice Indicator
ekpo~weunb " Goods Receipt, Non-Valuated
FROM mseg " Document Segment: Material
LEFT OUTER JOIN mkpf " Header: Material Document
ON ( mkpf~mblnr = mseg~mblnr
AND mkpf~mjahr = mseg~mjahr )
LEFT OUTER JOIN makt " Material Descriptions
ON ( makt~matnr = mseg~matnr
AND spras = @sy-langu )
LEFT OUTER JOIN ekpo " Scheduling Agreement Schedule Lines
ON ( ekpo~ebeln = mseg~ebeln
AND ekpo~ebelp = mseg~ebelp )
LEFT OUTER JOIN eban " Purchase Requisition
ON ( eban~banfn = ekpo~banfn )
INTO TABLE @i_final
FOR ALL ENTRIES IN @fp_export_list
WHERE mseg~mblnr = @fp_export_list-mblnr
AND mseg~mjahr = @fp_export_list-mjahr
AND mseg~zeile = @fp_export_list-zeile
AND ( mseg~kzbws <> ''
OR mseg~kzvbr <> '' )
AND eban~ernam IN @s_ernam
AND mseg~wempf IN @s_wempf
AND mseg~tcode2_mkpf NOT IN @lr_val.

IF sy-subrc <> 0.
flg_error = abap_true.
ENDIF. " IF sy-subrc <> 0
ENDIF. " IF fp_export_list IS NOT INITIAL

ENDFORM.
*&---------------------------------------------------------------------*
*& Form F_FILTER_MRP_CONTROLLER
*&---------------------------------------------------------------------*
* Fetch MRP Controller Details
*----------------------------------------------------------------------*
* -->FP_EXPORT_LIST type table of export list
*----------------------------------------------------------------------*
FORM f_filter_mrp_controller USING fp_export_list TYPE ty_t_export_list .
IF fp_export_list IS NOT INITIAL.

SELECT
mseg~ablad , " Unloading Point
mseg~anln1 , " Main Asset Number
mseg~anln2 , " Asset Subnumber
mseg~aplzl , " Internal counter
mseg~aufnr , " Order Number
mseg~aufpl , " Routing number of operations in the order
mkpf~bktxt , " Document Header Text
mkpf~bldat , " Document Date in Document
mseg~bpmng , " Quantity in Purchase Order Price Unit
mseg~bprme , " Order Price Unit (Purchasing)
mseg~bstme , " Purchase Order Unit of Measure
mseg~bstmg , " Goods receipt quantity in order unit
mkpf~budat , " Posting Date in the Document
mseg~budat_mkpf, " Posting Date in the Document
mseg~bukrs , " Company Code
mseg~bwart , " Movement Type (Inventory Management)
mseg~bwlvs , " Movement Type for Warehouse Management
mseg~bwtar , " Valuation Type
mseg~charg , " Batch Number
mkpf~cpudt , " Day On Which Accounting Document Was Entered
mseg~cpudt_mkpf , " Day On Which Accounting Document Was Entered
mkpf~cputm , " Time of Entry
mseg~cputm_mkpf , " Time of Entry
mseg~dmbtr , " Amount in Local Currency
mseg~ebeln , " Purchase Order Number
mseg~ebelp , " Item Number of Purchasing Document
mseg~erfme , " Unit of Entry
mseg~erfmg , " Quantity in Unit of Entry
mseg~exbwr , " Externally Entered Posting Amount in Local Currency
mseg~exvkw , " Externally Entered Sales Value in Local Currency
mkpf~frbnr , " Number of Bill of Lading at Time of Goods Receipt
mseg~grund , " Reason for Movement
mseg~kdauf , " Sales Order Number
mseg~kdein , " Delivery Schedule for Sales Order
mseg~kdpos , " Item Number in Sales Order
mseg~kostl , " Cost Center
mseg~kunnr , " Customer
mseg~kzbew , " Movement Indicator
mseg~kzvbr , " Consumption Posting
mseg~kzzug , " Receipt Indicator
mseg~lfbnr , " Document No. of a Reference Document
mseg~lgnum , " Warehouse Number / Warehouse Complex
mseg~lgort , " Storage Location
mseg~lgtyp , " Storage Type
mseg~lifnr , " Desired Vendor
mseg~llief , " Supplying Vendor
mseg~matnr , " Material Number
mseg~mat_kdauf , " Sales Order Number of Valuated Sales Order Stock
mseg~mat_kdpos , " Sales Order Item of Valuated Sales Order Stock
mkpf~mblnr , " Number of Material Document
mseg~meins , " Purchase Requisition Unit of Measure
mseg~menge , " Purchase Requisition Quantity
mkpf~mjahr , " Material Document Year
mseg~nplnr , " Network Number for Account Assignment
mseg~ps_psp_pnr, " Work Breakdown Structure Element (WBS Element)
mseg~rsnum , " Number of Reservation/Dependent Requirement
mseg~rspos , " Item Number of Reservation/Dependent Requirement
mseg~sakto , " G/L Account Number
mseg~shkzg , " Debit/Credit Indicator
mseg~sobkz , " Special Stock Indicator
mseg~tbnum , " Transfer Requirement Number
mkpf~tcode2 , " Transaction Code
mseg~tcode2_mkpf, " Transaction Code
mkpf~usnam , " User name
mseg~usnam_mkpf , " User name
mkpf~vgart , " Transaction/Event Type
mseg~vgart_mkpf , " Transaction/Event Type
mseg~vkwrt , " Value at Sales Prices Including Value-Added Tax
mseg~waers , " Currency Key
mseg~wempf , " Goods Recipient/Ship-To Party
mseg~werks , " Plant
mkpf~xabln , " Goods Receipt/Issue Slip Number
mseg~xauto , " Item automatically created
mkpf~xblnr , " Reference Document Number
mseg~xblnr_mkpf , " Reference Document Number
mseg~zeile , " Item in Material Document
mseg~maa_urzei , " Original Line for Account Assignment Item in Material
Doc.
mseg~xmacc , " Multiple Account Assignment
makt~maktx , " Material Description (Short Text)
ekpo~meins , " Purchase Requisition Unit of Measure
ekpo~pstyp , " Item Category in Purchasing Document
ekpo~vrtkz , " Distribution indicator for multiple account assignment
ekpo~twrkz , " Partial Invoice Indicator
ekpo~weunb " Goods Receipt, Non-Valuated
FROM mseg " Document Segment: Material

LEFT OUTER JOIN mkpf " Header: Material Document


ON ( mkpf~mblnr = mseg~mblnr
AND mkpf~mjahr = mseg~mjahr )
LEFT OUTER JOIN makt " Material Descriptions
ON ( makt~matnr = mseg~matnr
AND spras = @sy-langu )
LEFT OUTER JOIN ekpo " Scheduling Agreement Schedule Lines
ON ( ekpo~ebeln = mseg~ebeln
AND ekpo~ebelp = mseg~ebelp )
LEFT OUTER JOIN eban "Purchase Requisition
ON ( eban~banfn = ekpo~banfn )
LEFT OUTER JOIN marc
ON ( marc~matnr = mseg~matnr
AND marc~werks = mseg~werks )
INTO TABLE @i_final
FOR ALL ENTRIES IN @fp_export_list
WHERE mseg~mblnr = @fp_export_list-mblnr
AND mseg~mjahr = @fp_export_list-mjahr
AND mseg~zeile = @fp_export_list-zeile
AND mseg~kzbws = ''
AND mseg~kzvbr = ''
AND eban~ernam in @s_ernam
AND marc~dispo IN @s_dispo.

IF sy-subrc <> 0.
flg_error = abap_true.
ENDIF. " IF sy-subrc <> 0
ENDIF. " IF fp_export_list IS NOT INITIAL
ENDFORM.

*&---------------------------------------------------------------------*
*& Form F_REPORT_DISPLAY
*&---------------------------------------------------------------------*
* Display data in Report
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_report_display .

*--------------------------------------------------------------------*
* Local Variable Declaration
*--------------------------------------------------------------------*
DATA : lwa_layout TYPE slis_layout_alv, "Layout
l_variant TYPE disvariant. "Variant

lwa_layout-colwidth_optimize = abap_true.
l_variant-report = sy-repid.
l_variant-variant = p_var.

* Build Field Catalog


PERFORM f_build_field_catalog.

* Report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = lwa_layout
it_fieldcat = i_fld
i_default = 'X'
i_save = 'A'
is_variant = l_variant
TABLES
t_outtab = i_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
flg_error = abap_true.
ENDIF. " IF sy-subrc <> 0

ENDFORM.
*&---------------------------------------------------------------------*
*& Form F_BUILD_FIELD_CATALOG
*&---------------------------------------------------------------------*
* Build Field Catalog
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_build_field_catalog .

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MATNR'(007)
'Material'(008).
PERFORM f_append_fieldcat USING
'I_FINAL'(006)
'MAKTX'(009)
'Material Desc'(010).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'XBLNR'(011)
'Reference'(012).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'XBLNR_MKPF'(013)
'Ref. Doc'(014).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'WERKS'(015)
'Plant'(016).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'LGORT'(017)
'Storage Loc'(018).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'LGNUM'(019)
'Warehouse No.'(020).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BWLVS'(021)
'Mvt Type'(022).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MBLNR'(023)
'Mat. Doc'(024).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'ZEILE'(025)
'Item Mat. Doc.'(026).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'AUFNR'(027)
'Order'(028).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KOSTL'(029)
'Cost Centre'(030).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'ANLN1'(031)
'Asset'(032).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'NPLNR'(033)
'Network'(034).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'PS_PSP_PNR'(035)
'WBS Element'(036).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'WEMPF'(037)
'Recipient'(038).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'EBELN'(039)
'Purchase Order'(040).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'LIFNR'(041)
'Vendor'(042).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'LLIEF'(043)
'Suppl. Vendor'(044).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BWART'(045)
'Mvt'(046).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'VGART'(047)
'TETyp.'(048).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BWTAR'(049)
'Val Type'(050).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'CPUDT'(051)
'Entry Dt.'(052).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BUDAT'(053)
'Posting Dt.'(054).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'ERFMG'(055)
'Quantity in UnE'(056).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'ERFME'(057)
'Unit of Entry'(058).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'ABLAD'(059)
'Unloading Pnt'(060).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'ANLN2'(061)
'Asset Subnumber'(062).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'APLZL'(063)
'Internal Counter'(064).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'AUFPL'(065)
'Routing# in Order'(066).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BKTXT'(067)
'Document Header Text'(068).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BLDAT'(069)
'Document Dt.'(070).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BPMNG'(071)
'Quantity in PO'(072).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BPRME'(073)
'Order Price Unit'(074).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BSTME'(075)
'PO UoM'(076).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BSTMG'(077)
'GR Qty in Order Unit'(078).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BUDAT_MKPF'(079)
'Posting Dt in Document'(080).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'BUKRS'(081)
'Company Code'(082).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'CHARG'(083)
'Batch Number'(084).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'CPUDT_MKPF'(085)
'Accounting Doc Dt'(086).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'CPUTM'(087)
'Time of Entry'(088).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'CPUTM_MKPF'(089)
'Time of Entry'(090).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'DMBTR'(091)
'Amt in Local Curr.'(092).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'EBELP'(093)
'Itm No. Purchasing Doc'(094).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'EXBWR'(095)
'Ext Entered Posting Amt in Loc Curr'(096).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'EXVKW'(097)
'Ext Entered Sls Value in Loc Curr'(098).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'FRBNR'(099)
'No. of Bill of Lading at Time of GR'(100).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'GRUND'(101)
'Reason for Mvmt'(102).
PERFORM f_append_fieldcat USING
'I_FINAL'(006)
'KDAUF'(103)
'Sales Order No'(104).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KDEIN'(105)
'Delivery Schedule for Sales Order'(106).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KDPOS'(107)
'Item Number in Sales Order'(108).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KUNNR'(109)
'Customer'(110).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KZBEW'(111)
'Movement Indicator'(112).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KZVBR'(113)
'Consumption Posting'(114).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'KZZUG'(115)
'Receipt Indicator'(116).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'LFBNR'(117)
'Doc. Num of Ref. Doc.'(118).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'LGTYP'(119)
'Storage Type'(120).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MAT_KDAUF'(121)
'Sales Ord No. of valuated Sales Ord
Stock'(122).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MAT_KDPOS'(123)
'Sales Order Item of Valuated Sales Order
Stock'(124).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MEINS'(125)
'PR UoM'(126).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MENGE'(127)
'PR Qty'(128).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MJAHR'(129)
'Mat Doc Year'(130).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'RSNUM'(131)
'No. of Reserv/Dep Requirement'(132).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'RSPOS'(133)
'Item No. of Reserv/Dep Requirement'(134).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'SAKTO'(135)
'G/L Account Number'(136).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'SHKZG'(137)
'Debit/Credit Indicator'(138).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'SOBKZ'(139)
'Special Stock Indicator'(140).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'TBNUM'(141)
'Transfer Requirement Number'(142).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'TCODE2'(143)
'Transaction Code'(144).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'TCODE2_MKPF'(145)
' Transaction Code'(146).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'USNAM'(147)
'User name'(148).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'USNAM_MKPF'(149)
'User name'(150).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'VGART_MKPF'(151)
'Transaction/Event Type'(152).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'VKWRT'(153)
'Value at Sales Prices Including Value-Added
Tax'(154).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'WAERS'(155)
'Currency Key'(156).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'XABLN'(157)
'Goods Receipt/Issue Slip Number'(158).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'XAUTO'(159)
'Item automatically created'(160).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'MAA_URZEI'(161)
'Org Line for Acc Assignment Item in Material
Doc.'(162).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'XMACC'(163)
'Multiple Account Assignment'(164).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'EKPO_MEINS'(165)
'PR UoM'(166).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'PSTYP'(167)
'Item Cat in Pur Doc'(168).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'VRTKZ'(169)
'Dist ind for multiple acc assignment'(170).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'TWRKZ'(171)
'Partial Invoice Indicator'(172).

PERFORM f_append_fieldcat USING


'I_FINAL'(006)
'WEUNB'(173)
'Goods Receipt, Non-Valuated'(174).

ENDFORM.
*&---------------------------------------------------------------------*
*& Form F_APPEND_FIELDCAT
*&---------------------------------------------------------------------*
* Append Field catalog
*----------------------------------------------------------------------*
* --> fp_tabname Table Name
* --> fp_fieldname Field Name
* --> fp_Seltext_l Seltext large
*----------------------------------------------------------------------*

FORM f_append_fieldcat USING fp_tabname TYPE slis_tabname


fp_fieldname TYPE slis_fieldname
fp_seltext_l TYPE char100 " Long Field Label
.

DATA: lwa_fld TYPE slis_fieldcat_alv.

CLEAR lwa_fld.

lwa_fld-tabname = fp_tabname.
lwa_fld-fieldname = fp_fieldname.
lwa_fld-seltext_l = fp_seltext_l.

APPEND lwa_fld TO i_fld.

ENDFORM.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy