Nothing But SAP ABAP
Total Pageviews
Monday, December 13, 2010
Friday, December 10, 2010
ABAP Programming Report Stock Requirement List
This ABAP report gives you a sneak peak about about the SAP Report which can give you different options to extract data from the source server about stock requiremnt of a comapany.This report provides a real-time display of the inventory on hand and the requirements for a specific material. All recommendations and exception messages from MPS/MRP are as current as the most recent planning-run.
Starting with the current date, this report displays the inventory on hand, followed by one line for each element of supply and demand, any related MPS/MRP exception messages, and the projected balance. The report offers drilldown capabilities for additional detail to enable a quick assessment of the inventory position.
You must enter the Material number and Plant before running this report. If you want to review a product group instead of a specific material, you will need to enter the Product group on the first screen.
From the output of this report, you can:
- Immediately convert MPS/MRP planned orders into production orders
- Immediately convert purchase requisitions into purchase orders or scheduling agreements
- Start a pegging report for any element to determine the source of demand
- View lower-level dependent requirements and call up an order report
- Select various menu options to review detailed planning parameters
- Display available-to-promise calculations
- Invoke capacity planning functions from the menu
- Compare the last MRP report to assess changes in the planning situation
From this report, you can select the following functions:
Print the displayed stock/requirements results (List → Print).
Invoke the rescheduling function (List → Rescheduling).
Calculate ATP (List → Calculate ATP).
Display additional detail:
Stock statistics such as receipts, issues, quantities in restricted stock, at vendors, in transit, QI, and returns (Goto → Stock statistics)
Sales statistics such as quantity of a material on sales orders, quotes, and contracts (Goto → Sales statistics)
Planning data drawn from the material master, such as the MRP controller, MRP group, MRP type, reorder point and lot sizing data, availability check, special procurement type, and a recap of all receipts and issue by source/type (Goto → Material overview)
Display additional data such as a second exception message, order dates, quantity, strategy (Edit → Additional data; an icon is also available or you can simply double-click). From the popup window, it is possible to convert the item or invoke pegging reports; this can also be done directly from various Environment menu options.
To access the first screen for this report, choose
Logistics → Production → MRP → Evaluations → Stock/reqmts list.
1. Enter the material (for example, 100-100) or product group in Material.
2. Enter the plant associated with the material (for example, 3000) or product group in Plant.
3. If you entered a product group in step 1 above, select Product group.
4. Choose Enter.

A Date of receipt/requirement and associated type of supply or demand
B Material number, order number, etc.
C MRP exception message D Receipt or requirement quantity
E Available quantity
The width of columns may be adjusted by dragging the column divider.

Pricing Routines using VOFM transaction to change the Net Price in Billing to Basic Price
FORM FRM_KONDI_WERT_901.
*{ INSERT SMDK900281 1
**--- Routine for ZGPR
*---------------------------------------------------------------------*
* CONSTANTS DECLARATION
*---------------------------------------------------------------------*
CONSTANTS: C_ZGRP(4) VALUE 'ZGRP',
C_PR00(4) VALUE 'PR00',
C_JEXP(4) VALUE 'JEXP',
C_JEAP(4) VALUE 'JEAP',
C_JECE(4) VALUE 'JECE',
C_JESC(4) VALUE 'JESC',
C_ZS01(4) VALUE 'ZS01'.
*---------------------------------------------------------------------*
* DATA DECLARATION
*---------------------------------------------------------------------*
DATA: lv_ZGRP_KWERT like konv-kwert, "Condition Value of NET RATE
lv_JEXP_KWERT like konv-kwert, "Condition Value of A/R BED%
lv_JEAP_KWERT like konv-kwert, "Condition Value of A/R AED%
lv_JECE_KWERT like konv-kwert, "Condition Value of ECSS
lv_JESC_KWERT like konv-kwert, "Condition Value of SECSS
lv_PR00_KWERT like KONV-kwert, "Condition Value of Gross Price
lv_PR00_KBETR like komv-kbetr, "Amount for the condition PR00
lv_ZS01_KWERT like konv-kwert, "Condition Value of Cash Discount
LV_SUM_KWERT(16) type p decimals 2,
LV_XKWERT(16) TYPE P DECIMALS 2,
LV_RED_KWERT like konv-kwert,
LV_KPEIN(13) type C,
LV_CVAL_KWERT like komv-kwert,
lv_afd_KWERT like komv-kwert.
DATA: LTXKOMV LIKE XKOMV OCCURS 0 WITH HEADER LINE.
IF NOT XKOMV[] IS INITIAL.
LTXKOMV[] = XKOMV[].
clear : XKWERT , YKBETR, LV_CVAL_KWERT,lv_PR00_KBETR.
loop at ltxkomv.
CASE LTXKOMV-KSCHL.
WHEN C_ZGRP.
read table LTXKOMV with key kschl = C_ZGRP.
if sy-subrc = 0.
lv_ZGRP_KWERT = LTXKOMV-kwert.
endif.
WHEN C_ZS01.
read table LTXKOMV with key kschl = C_ZS01.
if sy-subrc = 0.
lv_ZS01_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JEXP.
read table LTXKOMV with key kschl = C_JEXP.
if sy-subrc = 0.
lv_JEXP_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JEAP.
read table LTXKOMV with key kschl = C_JEAP.
if sy-subrc = 0.
lv_JEAP_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JECE.
read table LTXKOMV with key kschl = C_JECE.
if sy-subrc = 0.
lv_JECE_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JESC.
read table LTXKOMV with key kschl = C_JESC.
if sy-subrc = 0.
lv_JESC_KWERT = LTXKOMV-kwert.
endif.
ENDCASE.
*--remove the discount amt from zgpr value
lv_afd_KWERT = lv_ZGRP_KWERT.
*--- Summ all the Excise Amounts
LV_SUM_KWERT = lv_JEXP_KWERT + lv_JEAP_KWERT + lv_JECE_KWERT + lv_JESC_KWERT.
*--- Subtract from the netamount without Discount
LV_RED_KWERT = lv_afd_KWERT - LV_SUM_KWERT.
LV_CVAL_KWERT = LV_RED_KWERT.
*--- For getting the Quantity
LV_KPEIN = xmenge.
*--- Call function Module to reamove the Decimal Zeros
CALL FUNCTION 'FTR_CORR_SWIFT_DELETE_ENDZERO'
CHANGING
C_VALUE = LV_KPEIN.
*--- Check for the availability of Quantity
if lv_kpein <> 0.
lv_PR00_KBETR = LV_CVAL_KWERT / LV_KPEIN.
endif.
endloop.
endif.
if not lv_SUM_KWERT is initial.
XKWERT = LV_CVAL_KWERT.
*---- Read table Conditions for the Condition Type Gross Price
read table ltxkomv with key kschl = C_PR00.
if sy-subrc = 0.
YKBETR = lv_PR00_KBETR.
ltxkomv-kbetr = YKBETR.
else.
YKBETR = lv_PR00_KBETR.
ltxkomv-kbetr = YKBETR.
endif.
*--- Populate the YKBETR value to get the Amount for the Condition PR00
xkomv-kbetr = YKBETR.
else.
XKWERT = LV_CVAL_KWERT.
endif.
*} INSERT
ENDFORM.
*{ INSERT SMDK900281 1
**--- Routine for ZGPR
*---------------------------------------------------------------------*
* CONSTANTS DECLARATION
*---------------------------------------------------------------------*
CONSTANTS: C_ZGRP(4) VALUE 'ZGRP',
C_PR00(4) VALUE 'PR00',
C_JEXP(4) VALUE 'JEXP',
C_JEAP(4) VALUE 'JEAP',
C_JECE(4) VALUE 'JECE',
C_JESC(4) VALUE 'JESC',
C_ZS01(4) VALUE 'ZS01'.
*---------------------------------------------------------------------*
* DATA DECLARATION
*---------------------------------------------------------------------*
DATA: lv_ZGRP_KWERT like konv-kwert, "Condition Value of NET RATE
lv_JEXP_KWERT like konv-kwert, "Condition Value of A/R BED%
lv_JEAP_KWERT like konv-kwert, "Condition Value of A/R AED%
lv_JECE_KWERT like konv-kwert, "Condition Value of ECSS
lv_JESC_KWERT like konv-kwert, "Condition Value of SECSS
lv_PR00_KWERT like KONV-kwert, "Condition Value of Gross Price
lv_PR00_KBETR like komv-kbetr, "Amount for the condition PR00
lv_ZS01_KWERT like konv-kwert, "Condition Value of Cash Discount
LV_SUM_KWERT(16) type p decimals 2,
LV_XKWERT(16) TYPE P DECIMALS 2,
LV_RED_KWERT like konv-kwert,
LV_KPEIN(13) type C,
LV_CVAL_KWERT like komv-kwert,
lv_afd_KWERT like komv-kwert.
DATA: LTXKOMV LIKE XKOMV OCCURS 0 WITH HEADER LINE.
IF NOT XKOMV[] IS INITIAL.
LTXKOMV[] = XKOMV[].
clear : XKWERT , YKBETR, LV_CVAL_KWERT,lv_PR00_KBETR.
loop at ltxkomv.
CASE LTXKOMV-KSCHL.
WHEN C_ZGRP.
read table LTXKOMV with key kschl = C_ZGRP.
if sy-subrc = 0.
lv_ZGRP_KWERT = LTXKOMV-kwert.
endif.
WHEN C_ZS01.
read table LTXKOMV with key kschl = C_ZS01.
if sy-subrc = 0.
lv_ZS01_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JEXP.
read table LTXKOMV with key kschl = C_JEXP.
if sy-subrc = 0.
lv_JEXP_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JEAP.
read table LTXKOMV with key kschl = C_JEAP.
if sy-subrc = 0.
lv_JEAP_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JECE.
read table LTXKOMV with key kschl = C_JECE.
if sy-subrc = 0.
lv_JECE_KWERT = LTXKOMV-kwert.
endif.
WHEN C_JESC.
read table LTXKOMV with key kschl = C_JESC.
if sy-subrc = 0.
lv_JESC_KWERT = LTXKOMV-kwert.
endif.
ENDCASE.
*--remove the discount amt from zgpr value
lv_afd_KWERT = lv_ZGRP_KWERT.
*--- Summ all the Excise Amounts
LV_SUM_KWERT = lv_JEXP_KWERT + lv_JEAP_KWERT + lv_JECE_KWERT + lv_JESC_KWERT.
*--- Subtract from the netamount without Discount
LV_RED_KWERT = lv_afd_KWERT - LV_SUM_KWERT.
LV_CVAL_KWERT = LV_RED_KWERT.
*--- For getting the Quantity
LV_KPEIN = xmenge.
*--- Call function Module to reamove the Decimal Zeros
CALL FUNCTION 'FTR_CORR_SWIFT_DELETE_ENDZERO'
CHANGING
C_VALUE = LV_KPEIN.
*--- Check for the availability of Quantity
if lv_kpein <> 0.
lv_PR00_KBETR = LV_CVAL_KWERT / LV_KPEIN.
endif.
endloop.
endif.
if not lv_SUM_KWERT is initial.
XKWERT = LV_CVAL_KWERT.
*---- Read table Conditions for the Condition Type Gross Price
read table ltxkomv with key kschl = C_PR00.
if sy-subrc = 0.
YKBETR = lv_PR00_KBETR.
ltxkomv-kbetr = YKBETR.
else.
YKBETR = lv_PR00_KBETR.
ltxkomv-kbetr = YKBETR.
endif.
*--- Populate the YKBETR value to get the Amount for the Condition PR00
xkomv-kbetr = YKBETR.
else.
XKWERT = LV_CVAL_KWERT.
endif.
*} INSERT
ENDFORM.
Subscribe to:
Posts (Atom)