ALV report requirement for peculiar SUBTOTAL
The following table is required for ALV report for inventory calculation.
The last column is the physical balance.
No......A.......... B....... C......D (D=A+B-C)
1......50........8........ 2.......56
2...... 20.........3.........1......22
3.......56.........10.......6...... 60
........50........21...... 9...... 60 (SUBTOTAL ROW)
Requirement for the subtotal row:
The subtotal for column A should be 50, It should take the first value 50 in the opening column in 1st row.
The subtotal for D column should be 60, It should be same as the value 60, in the LAST row that is 60
all other column subtotals are mathemetical totals as usual.
thanx
gaut
Edited by: gautam gautam on May 6, 2009 1:31 AM
Hi,
Try this
In side the loop
at new matnr.
capture the column1 (A)value into one variable
at end of matnr
capture the column 4 (D) value into one variable
and print it in subtotal row
Regards
Krishna
Similar Messages
-
Sample ALV report required for FI module
Hello friends,
I am develoing ALV report for FI module for that i need some sample ALV report. If someone have than please send it to me.
Thanx & Regards,
Rahul TaleleHI,
SEE THE SAMPLE REPORT
Fringe Benefit Tax Report
Program Name :
Object ID :
Functional Analyst :
Programmer :
Start date :
Initial CTS :
Description : FRINGE Benefit Tax
Includes :
Function Modules :
Logical database :
Transaction Code :
External references :
Modification Log
Date | Modified by | CTS number | Comments
| | | Initial Version *
REPORT ZFI_FBT NO STANDARD PAGE HEADING LINE-SIZE 255.
TYPE-POOLS: SLIS.
TYPES : BEGIN OF
T_BSIS,
BUKRS TYPE BUKRS, " Company Code
HKONT TYPE HKONT, " General Ledger Account
GJAHR TYPE GJAHR,
BELNR TYPE BELNR_D, " Accounting Document Number
BUDAT TYPE BUDAT, " Posting Date in the Document
BLDAT TYPE BLDAT, " Document Date in Document
XBLNR TYPE XBLNR1, " Reference Document Number
BSCHL TYPE BSCHL, " Posting Key
DMBTR TYPE DMBTR, " Amount in Local Currency
AUFNR TYPE AUFNR_NEU, " Order Number
NONFBT TYPE DMBTR, " non fbt amount
SUBFBT TYPE DMBTR, " subject to fbt amount
ZFI_FBT TYPE ZFI_FBT, " Qualifying amount.
AMOUNT TYPE DMBTR,
FBTPAY TYPE DMBTR,
ZFI_PAY TYPE ZFI_PAY,
END OF T_BSIS,
T_IT_BSIS TYPE STANDARD TABLE OF T_BSIS.
TYPES : BEGIN OF T_FRINGE,
ZFI_HKONT TYPE HKONT,
ZFI_FBT TYPE ZFI_FBT,
ZFI_PAY TYPE ZFI_PAY,
END OF T_FRINGE,
T_IT_FRINGE TYPE STANDARD TABLE OF T_FRINGE.
DATA : GIT_FRINGE TYPE T_IT_FRINGE,
GWA_FRINGE TYPE T_FRINGE.
DATA : GIT_BSIS TYPE T_IT_BSIS,
GWA_BSIS TYPE T_BSIS.
DATA : G_HKONT TYPE HKONT,
G_BUDAT TYPE BUDAT,
G_AUFNR TYPE AUFNR_NEU.
FIELD-SYMBOLS : <BSIS> TYPE T_BSIS.
DATA : G_REPID TYPE SY-REPID,
GIT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GWA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_EVENTS TYPE SLIS_T_EVENT,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
CONSTANTS : C_50(2) TYPE C VALUE '50'.
SELECTION SCREEN DEFINITIONS
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_BUKRS TYPE BUKRS DEFAULT 'H901' OBLIGATORY.
SELECT-OPTIONS : S_HKONT FOR G_HKONT,
S_BUDAT FOR G_BUDAT.
*PARAMETERS : P_AUFNR TYPE AUFNR_NEU DEFAULT '000000100001' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
EVENTS
INITIALIZATION.
INITIALIZATION.
G_REPID = SY-REPID.
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
PERFORM GET_ZTABLE. " get data from ZFII_FRINGE table
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM GET_DATA. " get data from BSIS table
IF NOT GIT_BSIS IS INITIAL.
PERFORM GET_PERCENTAGE. " to get the percentages from table ZFII_FRINGE
PERFORM CHK4_INTERNAL. " checking for the posting key wheather th document is reversed
" and checking wheather internal order is FBT or non-FBT
ENDIF.
END-OF-SELECTION.
END-OF-SELECTION.
IF NOT GIT_BSIS IS INITIAL.
PERFORM DISPLAY. " display ALV GRID display
ENDIF.
*& Form get_data
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT
BUKRS
HKONT
GJAHR
BELNR
BUDAT
BLDAT
XBLNR
BSCHL
DMBTR
AUFNR FROM BSIS
INTO TABLE GIT_BSIS
WHERE BUKRS EQ P_BUKRS AND
HKONT IN S_HKONT AND
BUDAT IN S_BUDAT.
IF SY-SUBRC NE 0.
MESSAGE I000(ZFI) WITH 'No data exist'.
EXIT.
ENDIF.
ENDFORM. " get_data
*& Form display
FORM DISPLAY .
PERFORM BUILD_FIELD_CATALOUGE.
PERFORM GET_EVENTS.
PERFORM DETERMINE_SORT_SEQUENCE.
PERFORM SUB_COMMENTERY_BUILD.
PERFORM ALV_DISPLAY.
ENDFORM. " display
*& Form build_field_catalouge
FORM BUILD_FIELD_CATALOUGE.
DATA : L_POS TYPE I.
L_POS = 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'HKONT' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'GL Account' " Column Name Text
' ' " Datatype
'X' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'BELNR' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'Document No.' " Column Name Text
' ' " Datatype
'X' " Key?
'1' " Row Position
'X' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'BUDAT' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'Posting Date' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'BLDAT' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'Docu. Date' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'XBLNR' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Ref. Doc. Number' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'DMBTR' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Gross Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'SUBFBT' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'FBT Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'NONFBT' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Non FBT Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'ZFI_FBT' " InTab Field Name
'GIT_BSIS' " InTab Name
'12' " Output Length
'Percentage' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'AMOUNT' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Qualifying Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'FBTPAY' " InTab Field Name
'GIT_BSIS' " InTab Name
'12' " Output Length
'FBT payable' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
ENDFORM. " build_field_catalouge
*& Form init_field_catalog
text
FORM INIT_FIELD_CATALOG USING P_GIT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
PV_POS LIKE GWA_FIELDCAT-COL_POS
PV_FIELDNAME LIKE GWA_FIELDCAT-FIELDNAME
PV_TABNAME LIKE GWA_FIELDCAT-TABNAME
PV_OUTPUT LIKE GWA_FIELDCAT-OUTPUTLEN
PV_SELTEXT LIKE GWA_FIELDCAT-SELTEXT_M
PV_DATATYPE LIKE GWA_FIELDCAT-DATATYPE
PV_KEY LIKE GWA_FIELDCAT-KEY
PV_ROW LIKE GWA_FIELDCAT-ROW_POS
PV_HOTSPOT LIKE GWA_FIELDCAT-HOTSPOT
PV_EMPHASIZE LIKE GWA_FIELDCAT-EMPHASIZE
PV_KEY_SEL LIKE GWA_FIELDCAT-KEY_SEL
PV_JUST LIKE GWA_FIELDCAT-JUST
PV_SUM LIKE GWA_FIELDCAT-DO_SUM.
DATA: LT_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
LT_FIELDCAT-OUTPUTLEN = PV_OUTPUT.
LT_FIELDCAT-COL_POS = PV_POS.
LT_FIELDCAT-FIELDNAME = PV_FIELDNAME.
LT_FIELDCAT-TABNAME = PV_TABNAME.
LT_FIELDCAT-SELTEXT_M = PV_SELTEXT.
LT_FIELDCAT-KEY = PV_KEY.
LT_FIELDCAT-ROW_POS = PV_ROW.
LT_FIELDCAT-HOTSPOT = PV_HOTSPOT.
LT_FIELDCAT-EMPHASIZE = PV_EMPHASIZE.
LT_FIELDCAT-KEY_SEL = PV_KEY_SEL.
LT_FIELDCAT-DO_SUM = PV_SUM.
LT_FIELDCAT-JUST = PV_JUST.
LT_FIELDCAT-DATATYPE = PV_DATATYPE.
APPEND LT_FIELDCAT TO P_GIT_FIELDCAT.
CLEAR LT_FIELDCAT.
ENDFORM. " init_field_catalog
*& Form alv_display
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
i_grid_title = 'Fringe Benefit Tax'
I_GRID_SETTINGS =
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GIT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = GIT_BSIS
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " alv_display
*& Form chk4_internal
text
--> p1 text
<-- p2 text
FORM CHK4_INTERNAL .
LOOP AT GIT_BSIS ASSIGNING <BSIS>.
IF <BSIS> IS ASSIGNED.
IF <BSIS>-BSCHL = C_50.
<BSIS>-DMBTR = <BSIS>-DMBTR * -1.
ENDIF.
IF NOT <bsis>-aufnr IS INITIAL.
IF <BSIS>-AUFNR = '000000100000'. " P_AUFNR.
<BSIS>-SUBFBT = <BSIS>-DMBTR.
<BSIS>-AMOUNT = ( <BSIS>-SUBFBT * <BSIS>-ZFI_FBT ) / 100.
ELSE.
IF <bsis>-aufnr = '000000100020'.
<BSIS>-NONFBT = <BSIS>-DMBTR.
ENDIF.
ENDIF.
<BSIS>-FBTPAY = ( <BSIS>-AMOUNT * <BSIS>-ZFI_PAY ) / 100.
ENDIF.
ENDLOOP.
UNASSIGN <BSIS>.
ENDFORM. " chk4_internal
*& Form get_ztable
text
--> p1 text
<-- p2 text
FORM GET_ZTABLE .
REFRESH : GIT_FRINGE.
SELECT HKONT
ZFI_FBT
ZFI_PAY
FROM ZFI_FBT_DETL
INTO TABLE GIT_FRINGE
FOR ALL ENTRIES IN s_hkont
WHERE HKONT IN S_HKONT.
CHECK SY-SUBRC EQ 0.
SORT GIT_FRINGE BY ZFI_HKONT.
ENDFORM. " get_ztable
*& Form get_percentage
text
--> p1 text
<-- p2 text
FORM GET_PERCENTAGE .
CLEAR : GWA_FRINGE.
LOOP AT GIT_BSIS ASSIGNING <BSIS>.
IF <BSIS> IS ASSIGNED.
READ TABLE GIT_FRINGE INTO GWA_FRINGE WITH KEY
ZFI_HKONT = <BSIS>-HKONT
BINARY SEARCH.
CHECK SY-SUBRC EQ 0.
<BSIS>-ZFI_FBT = GWA_FRINGE-ZFI_FBT.
<BSIS>-ZFI_PAY = GWA_FRINGE-ZFI_PAY.
ENDIF.
ENDLOOP.
UNASSIGN <BSIS>.
ENDFORM. " get_percentage
*& Form determine_sort_sequence
text
--> p1 text
<-- p2 text
FORM DETERMINE_SORT_SEQUENCE .
DATA : LS_SORT TYPE SLIS_SORTINFO_ALV.
LS_SORT-SPOS = 1. " Sort order
LS_SORT-FIELDNAME = 'HKONT'.
LS_SORT-TABNAME = 'GIT_BSIS'.
LS_SORT-UP = 'X'.
LS_SORT-SUBTOT = 'X'. " Sub total allowed
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
ENDFORM. " determine_sort_sequence
*& Form get_events
text
--> p1 text
<-- p2 text
FORM GET_EVENTS .
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = GT_EVENTS.
READ TABLE GT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO GT_EVENTS.
ENDIF.
READ TABLE GT_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_USER_COMMAND TO LS_EVENT-FORM.
APPEND LS_EVENT TO GT_EVENTS.
ENDIF.
ENDFORM. " get_events
*& Form sub_commentery_build
text
--> p1 text
<-- p2 text
FORM SUB_COMMENTERY_BUILD .
DATA: LS_LINE TYPE SLIS_LISTHEADER.
DATA : L_LOW TYPE CHAR10,
L_HIGH TYPE CHAR10,
L_DATE TYPE CHAR25.
CONCATENATE S_BUDAT-LOW6(2) '.' S_BUDAT-LOW4(2) '.' S_BUDAT-LOW+0(4) INTO L_LOW.
CONCATENATE S_BUDAT-HIGH6(2) '.' S_BUDAT-HIGH4(2) '.' S_BUDAT-HIGH+0(4) INTO L_HIGH.
CONCATENATE L_LOW ' - ' L_HIGH INTO L_DATE.
***header
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = 'Fringe Benefit Tax'.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
***Selection
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Company Code'.
LS_LINE-INFO = P_BUKRS.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Posting Date'.
LS_LINE-INFO = L_DATE.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
ENDFORM. " sub_commentery_build
FORM TOP_OF_PAGE *
When TOP-OF-PAGE will be fired , this event will be called and it
will use the contents of i_list_top_of_page for output in the header
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM. "top_of_page
*& Form USER_COMMAND
Called from within the ALV processes. Currently, '&IC1' is used to
process the hotspot and display the document 'picked' by the user.
FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
CLEAR : GWA_BSIS.
CASE PV_UCOMM.
WHEN '&IC1'.
READ TABLE GIT_BSIS INTO GWA_BSIS INDEX SELFIELD-TABINDEX.
CASE SELFIELD-SEL_TAB_FIELD.
WHEN 'GIT_BSIS-BELNR'.
IF NOT GWA_BSIS-BELNR IS INITIAL.
SET PARAMETER ID: 'BUK' FIELD GWA_BSIS-BUKRS,
'BLN' FIELD GWA_BSIS-BELNR,
'GJR' FIELD GWA_BSIS-GJAHR.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDIF.
WHEN OTHERS.
ENDCASE.
WHEN OTHERS.
ENDCASE.
CLEAR : GWA_BSIS.
ENDFORM. "user_command
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'.
ENDFORM. "SET_PF_STATUSENDFORM. "SET_PF_STATUS
AWARD POINTS IF USEFUL.... -
Alv report scenarios for PP?
anyone let me know the ALV report scenarios for Production planning?
Also, let me know the exits in PP? thanku.hi,
these are the exits related to production order.
Exit name
CCOWB001
COIB0001
COZF0001
COZF0002
PPCO0001
PPCO0002
PPCO0003
PPCO0004
PPCO0005
PPCO0006
PPCO0007
PPCO0008
PPCO0009
PPCO0010
PPCO0012
PPCO0013
PPCO0015
PPCO0016
PPCO0017
PPCO0018
PPCO0019
PPCO0021
PPCO0022
PPCO0023
STATTEXT
just go through the TCODE COOIS for the alv report scenarios
reward if helpful.
Regards.
Praveen -
Combined debt reports required for 'associated' customers showing amountof
Combined debt reports required for 'associated' customers showing amountof debt and aged by month
Mugunthan
Yes we have applied 11i.AZ.H.2. I am getting several errors still that we trying to resolve
One of them is
===========>>>
Uploading snapshot to central instance failed, with 3 different messages
Error: An invalid status '-1' was passed to fnd_concurrent.set_completion_status. The valid statuses are: 'NORMAL', 'WARNING', 'ERROR'FND at oracle.apps.az.r12.util.XmlTransmorpher.<init>(XmlTransmorpher.java:301)
at oracle.apps.az.r12.extractor.cpserver.APIExtractor.insertGenericSelectionSet(APIExtractor.java:231)
please assist.
regards
girish -
hi
can anyone send me a simple and easily understandable ALV report.
points will be rewarded....Hi,
I think this will help u a lot...Plz reward if helpful to u...
REPORT ZSDR_SOSA NO STANDARD PAGE HEADING
LINE-COUNT 65 LINE-SIZE 100.
--Tables--
tables: vbap, vbak, vbpa, vbkd, makt,konv.
--Data Fetching--
TYPE-POOLS: slis.
data:begin of i_vbap occurs 0,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
matnr like vbap-matnr,
arktx like vbap-arktx,
kdmat like vbap-kdmat,
taxm1 like vbap-taxm1,
end of i_vbap.
data:begin of i_vbak occurs 0,
vbeln like vbak-vbeln,
audat like vbak-audat,
vbtyp like vbak-vbtyp,
vkorg like vbak-vkorg,
knumv like vbak-knumv,
kunnr like vbak-kunnr,
end of i_vbak.
data:begin of i_vbpa occurs 0,
vbeln like vbpa-vbeln,
posnr like vbpa-posnr,
parvw like vbpa-parvw,
kunnr like vbpa-kunnr, "SH
kunnr1 like vbpa-kunnr, "SP
end of i_vbpa.
data:begin of i_konv occurs 0,
knumv like konv-knumv,
kschl like konv-kschl,
kbetr like konv-kbetr,
mwsk1 like konv-mwsk1,
end of i_konv.
data:begin of i_vbkd occurs 0,
vbeln like vbkd-vbeln,
posnr like vbkd-posnr,
bstkd like vbkd-bstkd,
bstdk like vbkd-bstdk,
end of i_vbkd.
data:begin of i_makt occurs 0,
matnr like makt-matnr,
spras like makt-spras,
maktx like makt-maktx, "MAt. Desc
maktx1 like makt-maktx, "Cust mat. no.
end of i_makt.
data:wa_makt like makt.
DATA:BEGIN OF itab OCCURS 0,
vbeln like vbap-vbeln, "SD no.
audat like vbak-audat, "Order date
kunnr like vbpa-kunnr, "sold to party
kunnr1 like vbpa-kunnr, "ship to party
matnr like vbap-matnr, "Mat. No.
maktx like makt-maktx, "Material Desc.
kdmat like vbap-kdmat, "Cust. Mat.no.
maktx1 like makt-maktx, "Customer Mat. desc.
bstkd like vbkd-bstkd, "PO number
bstdk like vbkd-bstdk, "PO date
kbetr like konv-kbetr, "Basic Price
knumv like vbak-knumv,
vkorg like vbak-vkorg,
vbtyp like vbak-vbtyp,
parvw like vbpa-parvw,
kschl like konv-kschl,
mwsk1 like konv-mwsk1,
posnr like vbap-posnr,
arktx like vbap-arktx,
taxm1 like vbap-taxm1,
END OF itab.
--ALV DECLARATION--
DATA :v_pgm LIKE sy-repid.
DATA :col_pos TYPE i.
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
gt_events TYPE slis_t_event,
gd_prntparams TYPE slis_print_alv.
DATA:fcat TYPE slis_t_fieldcat_alv,
fcat1 TYPE slis_t_fieldcat_alv,
fcat2 TYPE slis_t_fieldcat_alv,
eve TYPE slis_t_event,
eve1 TYPE slis_t_event,
subtot TYPE slis_t_sortinfo_alv,
g_subtot LIKE LINE OF subtot.
--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:s_audat FOR vbak-audat,
s_vkorg for vbak-vkorg,
s_kunnr for vbak-kunnr.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:p_sorder RADIOBUTTON GROUP rad1,
p_agree RADIOBUTTON GROUP rad1,
p_order radiobutton group rad1.
SELECTION-SCREEN END OF BLOCK b2.
--Initialization--
INITIALIZATION.
v_pgm = sy-repid.
--Start-of-selection--
Start-of-selection.
if p_sorder = 'X'.
perform get_sorder_data.
perform process_data.
perform display_data1.
elseif p_agree = 'X'.
perform get_agree_data.
perform process_data.
perform display_data1.
elseif p_order = 'X'.
perform get_order_data.
perform process_data.
perform display_data1.
endif.
*& Form get_sorder_data
text
--> p1 text
<-- p2 text
FORM get_sorder_data .
*Get from VBAK table.
select vbeln audat vbtyp vkorg knumv kunnr
from vbak into table i_vbak
where audat in s_audat
and vkorg in s_vkorg
and kunnr in s_kunnr
and vbtyp in ('C','E').
*Get from VBAP table.
if not i_vbak[] is initial.
clear:i_vbap. refresh:i_vbap.
select vbeln posnr matnr arktx kdmat taxm1
from vbap into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
*Get from VBPA table.
if not i_vbap[] is initial.
clear:i_vbpa. refresh:i_vbpa.
select vbeln posnr parvw kunnr
from vbpa into table i_vbpa
for all entries in i_vbap
where vbeln = i_vbap-vbeln
and parvw in ('AG','KB','RE','RG','VE','WE','ZM').
endif.
*Get from KONV table.
if not i_vbak[] is initial.
clear:i_konv. refresh:i_konv.
select knumv kschl kbetr mwsk1
from konv into table i_konv
for all entries in i_vbak
where knumv = i_vbak-knumv
and kschl = 'PR00'.
endif.
*Get from VBKD table.
if not i_vbak[] is initial.
clear:i_vbkd. refresh:i_vbkd.
select vbeln posnr bstkd bstdk
from vbkd into table i_vbkd
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
**Get from MAKT table.
if not i_vbap[] is initial.
clear:i_makt. refresh:i_makt.
select single maktx
from makt into i_makt
for all entries in i_vbap
where matnr = i_vbap-matnr
and spras = sy-langu.
endif.
ENDFORM. " get_sorder_data
*& Form process_data
text
--> p1 text
<-- p2 text
FORM process_data .
Loop at i_vbap.
itab-vbeln = i_vbap-vbeln.
itab-posnr = i_vbap-posnr.
itab-matnr = i_vbap-matnr.
itab-arktx = i_vbap-arktx.
itab-kdmat = i_vbap-kdmat.
itab-taxm1 = i_vbap-taxm1.
*Get from MAKT table.
select single maktx from makt
into wa_makt-maktx
where matnr = itab-matnr
and spras = sy-langu.
if sy-subrc = 0.
itab-maktx = wa_makt-maktx.
itab-maktx1 = wa_makt-maktx.
endif.
read table i_vbak with key vbeln = itab-vbeln.
if sy-subrc = 0.
itab-audat = i_vbak-audat.
itab-knumv = i_vbak-knumv.
itab-vkorg = i_vbak-vkorg.
itab-vbtyp = i_vbak-vbtyp.
endif.
read table i_vbpa with key vbeln = itab-vbeln.
if sy-subrc = 0.
itab-parvw = i_vbpa-parvw.
itab-kunnr = i_vbpa-kunnr.
itab-kunnr1 = i_vbpa-kunnr.
endif.
read table i_konv with key knumv = itab-knumv.
if sy-subrc = 0.
itab-kschl = i_konv-kschl.
itab-kbetr = i_konv-kbetr.
itab-mwsk1 = i_konv-mwsk1.
endif.
read table i_vbkd with key vbeln = itab-vbeln.
if sy-subrc = 0.
itab-bstkd = i_vbkd-bstkd.
itab-bstdk = i_vbkd-bstdk.
endif.
read table i_makt with key matnr = itab-matnr.
if sy-subrc = 0.
itab-maktx = i_makt-maktx.
itab-maktx1 = i_makt-maktx1.
endif.
append itab.
clear itab.
endloop.
delete itab where not audat in s_audat.
delete itab where not vkorg in s_vkorg.
delete itab where not kunnr in s_kunnr.
ENDFORM. " process_data
*& Form display_data1
text
--> p1 text
<-- p2 text
FORM display_data1 .
PERFORM get_buildfieldcat1.
PERFORM display_alv.
ENDFORM. " display_data1
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
IF itab[] IS INITIAL.
MESSAGE 'No Data Exist' TYPE 'E'.
ENDIF.
DATA: title TYPE lvc_title
, datelow(10) TYPE c
, datehigh(10) TYPE c
DATA: gd_repid LIKE sy-repid
, gd_layout TYPE slis_layout_alv
***************Layout Formatting***************
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-zebra = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
***************Layout Formatting***************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_pgm
i_callback_top_of_page = 'ALV_TOP_OF_PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND' "'ALV_USER_COMMAND'
i_grid_title = title
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
it_sort = subtot
is_variant = z_template
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_alv
*& Form ALV_TOP_OF_PAGE
ALV Report Header *
--> p1 text
<-- p2 text
FORM alv_top_of_page .
*ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc(10) TYPE c.
FORM alv_top_of_page1 .
DATA: i_header TYPE slis_t_listheader,
wa1_header TYPE slis_listheader,
i_line LIKE wa1_header-info,
lld_lines TYPE i,
lld_linesc(10) TYPE c.
Title
wa1_header-typ = 'H'.
wa1_header-info = 'Schedule Line-Basic Price Details'.
APPEND wa1_header TO t_header.
CLEAR wa1_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
APPEND wa_header TO t_header.
CLEAR: wa_header.
wa_header-typ = 'S'.
wa_header-key = 'Time: '.
CONCATENATE
sy-uzeit(2) ':'
sy-uzeit+2(2) ':'
sy-uzeit+4(2) INTO wa_header-info. "time
APPEND wa_header TO t_header.
CLEAR: wa_header.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
Total No. of Rows Displayed
DESCRIBE TABLE itab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Rows: ' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header
i_logo = 'Z_LOGO'
ENDFORM. "alv_top_of_page
*& Form get_buildfieldcat1
text
--> p1 text
<-- p2 text
FORM get_buildfieldcat1 .
DATA position TYPE i.
position = -1.
position = position + 1.
fieldcatalog-fieldname = 'VBELN'.
fieldcatalog-seltext_m = 'Sales Order No.'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'AUDAT'.
fieldcatalog-seltext_m = 'Order Date'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 15.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'KUNNR'.
fieldcatalog-seltext_m = 'Sold to Party'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'KUNAG'.
fieldcatalog-seltext_m = 'Ship to Party'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material No.'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'MAKTX'.
fieldcatalog-seltext_m = 'Material Desc.'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'KDMAT'.
fieldcatalog-seltext_m = 'Customer Material No.'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'MAKTX1'.
fieldcatalog-seltext_m = 'Customer Material Desc'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'BSTKD'.
fieldcatalog-seltext_m = 'Purchase Order No.'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'BSTDK'.
fieldcatalog-seltext_m = 'Purchase Order Date'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
position = position + 1.
fieldcatalog-fieldname = 'KBETR'.
fieldcatalog-seltext_m = 'Basic Price'.
fieldcatalog-col_pos = position.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " get_buildfieldcat1
*& Form get_agree_data
text
--> p1 text
<-- p2 text
FORM get_agree_data .
*Get from VBAK table.
select vbeln audat vbtyp vkorg knumv kunnr
from vbak into table i_vbak
where audat in s_audat
and vkorg in s_vkorg
and kunnr in s_kunnr
and vbtyp in ('C','E').
*Get from VBAP table.
if not i_vbak[] is initial.
clear:i_vbap. refresh:i_vbap.
select vbeln posnr matnr arktx kdmat taxm1
from vbap into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
*Get from VBPA table.
if not i_vbap[] is initial.
clear:i_vbpa. refresh:i_vbpa.
select vbeln posnr parvw kunnr
from vbpa into table i_vbpa
for all entries in i_vbap
where vbeln = i_vbap-vbeln
and parvw in ('AG','KB','RE','RG','VE','WE','ZM').
endif.
*Get from KONV table.
if not i_vbak[] is initial.
clear:i_konv. refresh:i_konv.
select knumv kschl kbetr mwsk1
from konv into table i_konv
for all entries in i_vbak
where knumv = i_vbak-knumv
and kschl = 'PR00'.
endif.
*Get from VBKD table.
if not i_vbak[] is initial.
clear:i_vbkd. refresh:i_vbkd.
select vbeln posnr bstkd bstdk
from vbkd into table i_vbkd
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
ENDFORM. " get_agree_data
*& Form get_order_data
text
--> p1 text
<-- p2 text
FORM get_order_data .
*Get from VBAK table.
select vbeln audat vbtyp vkorg knumv kunnr
from vbak into table i_vbak
where audat in s_audat
and vkorg in s_vkorg
and kunnr in s_kunnr
and vbtyp in ('C','E').
*Get from VBAP table.
if not i_vbak[] is initial.
clear:i_vbap. refresh:i_vbap.
select vbeln posnr matnr arktx kdmat taxm1
from vbap into table i_vbap
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
*Get from VBPA table.
if not i_vbap[] is initial.
clear:i_vbpa. refresh:i_vbpa.
select vbeln posnr parvw kunnr
from vbpa into table i_vbpa
for all entries in i_vbap
where vbeln = i_vbap-vbeln
and parvw in ('AG','KB','RE','RG','VE','WE','ZM').
endif.
*Get from KONV table.
if not i_vbak[] is initial.
clear:i_konv. refresh:i_konv.
select knumv kschl kbetr mwsk1
from konv into table i_konv
for all entries in i_vbak
where knumv = i_vbak-knumv
and kschl = 'PR00'.
endif.
*Get from VBKD table.
if not i_vbak[] is initial.
clear:i_vbkd. refresh:i_vbkd.
select vbeln posnr bstkd bstdk
from vbkd into table i_vbkd
for all entries in i_vbak
where vbeln = i_vbak-vbeln.
endif.
ENDFORM. " get_order_data
With Regards,
Seevangi -
Report Requirment for YTD and individual fisc periods
Hi Team,
I have a requirement in the report that should have the below structure
Fiscal Year Actual Actual Actual Actual Actual Actual
YTD 2008 2009 2010 2011 2012
Char1 Char1 FiscalPer APR 2010 MAY2010 .... MAR2011
Fiscal Year and Fisc period are in column and Char1 and Char2 are in Rows of the report.
For a particular year alone, I need the actual amount splitted on fiscal year period and rest of the past and furture years the actual amount should be aggregated for the year.
Please let me know if have come across this scenario.
Regards,
Ramesh
Edited by: ramesh kumar on Aug 10, 2010 5:52 AMHi Ramesh,
I am assuming your scenario as followes -
If User enters year(user entry variable) - 'Y1', You need to display key figs by - 'Y1Period 1'....... 'Y1Period 12'. For rest of the years(future and past from Y1), data should be aggregated and displayed per year.
The solutions would be -
Create Restricted Key Figs, for Y1Period1 - restrict it to user entry variable for year(Y1) and then to posting period hard coded to 1. Similalry create rest of the key figs for each period by changing the hard coded period value for 1 through 12.
Create restricted key fig for past years from Y1 - restrict it to user entry variable for year(Y1) and then add offset of '-1'. Simmilarly create rest of key figs for other previous years by increaing offset -2, -3 so on.
Create restricted key fig for future years from Y1 - restrict it to user entry variable for year(Y1) and then add offset of '+1'. Simmilarly create rest of key figs for other future years by increaing offset +2, +3 so on.
Hope this helps.
Regards,
Pritesh. -
Report requirement, for count before the input selection.
Hi All,
I have a requirement:
And in infoprovider we have :
in 07.2011, 10 records were created.
in 08.2011, 40 records were created.
in 09.2011, 50 records were created.
in 10.2011, 70 records were created.
User enters month interval like 07.2011 - 10.2011
and wants outout like:
Calmonth:... 07.2011....08.2011.......09.2011.......10.2011
Count : ........30010.......30050...........30100..........30170
Means.in report 07.2011 should show all the count upto 07.2011,
Similarly 08.2011 show all counts upto 08.2011 month. And in same way others also.
Since input is 07.2011 to 10.2011, so report is considering only data between this range only.
How do i get count before 07.2011 in report and meet report requirement.
Please suggest and let me know if more information is required.
Thanks,
Jitender.Hi Jitender,
It is not possible to generate the query columns dynamically in the output based on the user input.
For getting the aggregated value what you can do is, create a customer exit variable on fiscal period and restrict it from some starting period till user entered period.
In your example let us say you have data from 07.2009 then your customer exit variable will have range from 07.2009 till 07.2011. Use this variable in a RKF with count as key figure and period as customer exit variable here you will get the output as 30010.
For getting the next columns you can change the period range by using offset. But you will have to create different columns beforehand in the query design itself. The only thing you can do is based on the user input different columns will be populated even you can keep the dynamic text using text variable so that you will get dynamic period heading but dynamic creation of columns is not possible.
Regards,
Durgesh. -
Custom reports required for bangladesh.
Hi All,
What are custom reports normally required for Bangladesh considering their statutory norms?
Regds
RK.Hi Sharvari,
This report is most sought and important report because now C Form and F form collection has become online and accurate data have to be provide to the sales tax authorities based on which these forms will be issued.
On this matter I suggest you don't spend time in questing reports for these forms because standard system does not provide. It is better that you sit with an ABAPer spending logical effort and get the customized report which will be great ease to sales tax processing.
Regards,
Chintan Joshi. -
CIN Reports requirement for Excise Authorities
Hallow SAP Guru's !!
Can anybody explain, What are the Mandatory CIN (Tax) reports are required for Excise Authorities by Materials Management side ?
Thanks in advance !!!!!!!Friend
As per Indian Law, the excise authorities require you to maintain the following registers relating to excise duty.
Register RG 1
Register RG 23A and 23C, Parts I and II
Register RG 23D
Personal Ledger Account (PLA)
Register RT-12
and all of these registers have a required output layout in Standard SAP System
ENJOY SAP
Regards -
Report Requirement for the Goods Movement
Dear Gurs,
I want to see the entire goods movment happend for producing one Finished material.
Is there any std report that can show the list of good movement (261)
Eg
For producing 1 Qty FG I required 50 Kg of SF .
That SF consits of 2 Raw material RM 1 and RM2 .
RM1 Required 35 Kg and RM 2 Requires 15 Kg
During Good Movement (261)of - SF
RM1 - Batch 421 - 12 Kg
RM1- Batch 422 - 18 Kg
RM1 - Batch 433 - 5 Kg
RM2 Batch 888 - 5 Kg
RM2 Batch 889 - 10 Kg
During the Good Movement (261)of - FG
SF Batch 1123 - 50 Kg Issued.
With reference to the Finish material , I want to seen the goods movement happend for the FG .
Is there any std report to seen the details at Multilevels
Srinivasan.Hi,
I donot think such Multi level Consumption Report is available. I think if use collective order concept, u can get it. Otherwise u have to pass the list Production order number for each BOM level at COOIS.
or u have to develop customized report.
Pradeep -
Dear cons
I want a report that contains some field. but my ABAP CONS. is not able to devlop it. we procure some material & kept in one storage location.we have two storage location.from one st. loc to another st. loc we want to transfer by move ment type-415.( within one plant) how can we devlop it. from which table data will pick .
thanks
nrkHi Nirupama,
Reading your post, i am not quite clear, if you want to just post materials from one s-loc to another s-loc or whether you want a report to read stock in both these s-locs.
Anyways if you want to just transfer material from one s-loc to another, you can use MB1B with mvt. type 311 for one step transfer or 313 & 315 for 2 step transfer.
If you want a report to read the stock levels in the storage location, you need to refer to the table MARD.
Hope i was able to provide some relevant information. If you require any further info, please let me know.
Regards,
Vivek -
Validation of data in editable ALV report output for particular field
Hi Experts,
I have one input enabled field in ALV output. How to validate the data once user enters in that field and press enter? Is it possible to capture the value, hit the enter after user enters the data?
Thanks,
Surya PrakashHalo Prakash,
1 First you should registeer the ENTER Event.
call method g_grid->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
2 Declare event handler method for Event data_changed of cl_gui_alv_grid.
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
3 Inside the Event handler method , you get the event parameter er_data_changed type ref to CL_ALV_CHANGED_DATA_PROTOCOL.
loop at er_data_changed->mt_good_cells into ls_good.
case ls_good-fieldname.
when 'FIELD1'.
call method check_FIELD1.
when 'FIELD2 '.
call method check_FIELD2
endcase.
endloop.
4 Inside the Method check_FIELD1 and check_FIELD2 you can do the validation check .
call method er_data_changed->get_cell_value( Passing the row no and field name).
if the check fails you can use add_protocol_entry to write the error.
5 Finally call
er_data_changed->display_protocol.
Regards
Arshad -
Report required for payments made
Hi
I want to know TCode for the report which shows:
1. List of payments made within & over due dates
2. List of payments to be made on due datesHi,
Please refer to standard sap reports S_ALR_87012084, S_ALR_87012085 & S_P99_41000099 -
Unit cost report required for project system
HI ALL
i have entered the planned unit cost of wbs element with cost element from cj40 buth the line item report of that planned cost does not show any data please
tell me how it show the data.
or
but any body can tell me the report to display the unit cost value and their quanity. for wbs element + cost element. i know one report i.e. cji4 but it does not show the data
thanksHi Shabbir,
Please refer the below report :
S_ALR_87013619 Range: Assigned Orders/WBS Elements
S_ALR_87013014 List: Cost Elements
Pls assign points as way to say thanks -
Add multilple PO's to already existing ALV report
hello all,
i have an ALV Report requirement like below...
serno network no activity no service code service text units purchase requisition num PR item PR qty Agreement num Agrmt item Agremt qty
1 410000001401 0020 SCL10051 **** KM 19000000461 1 20 56000000199 1 200
2 410000001401 0030 SCL10052 **** EA 19000000461 2 30 56000000199 1 500
now my question is i have Purchase Order and PO qty(which i ahve taken from EKPO)...
for a given purchase requisition number there are multiple PO's (say 10 Po's)...
how do i add these PO's to above ALV report....
thanks in advance....Dear Vinay,
Please use these piece of code...........
These report contains sending Mail & As per your layout comment the sending mail codes and use for your requirement...........
Paste in a test program and check these is sales order based report..........
Built field catalog & and sort your PO number as per in the field output display and field catalog....................................
* Type Group Declaration
TYPE-POOLS: slis,vrm.
* Tables Declaration
TABLES : vbak.
* Structure Declaration
TYPES: BEGIN OF ty_vbakvbap,
vbeln TYPE vbak-vbeln,
kunnr TYPE vbak-kunnr,
netpr TYPE vbap-netpr,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
kwmeng TYPE vbap-kwmeng,
arktx TYPE vbap-arktx,
END OF ty_vbakvbap,
gt_t_vbakvbap TYPE STANDARD TABLE OF ty_vbakvbap.
TYPES : BEGIN OF ty_kna1,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
pstlz TYPE kna1-pstlz,
stras TYPE kna1-stras,
ort01 TYPE kna1-ort01,
land1 TYPE kna1-land1,
END OF ty_kna1,
gt_t_kna1 TYPE STANDARD TABLE OF ty_kna1.
TYPES : BEGIN OF ty_mara,
mbrsh TYPE mara-mbrsh,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF ty_mara,
gt_t_mara TYPE STANDARD TABLE OF ty_mara.
TYPES : BEGIN OF ty_final,
vbeln TYPE vbak-vbeln,
kunnr TYPE vbak-kunnr,
netpr TYPE vbap-netpr,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
kwmeng TYPE vbap-kwmeng,
arktx TYPE vbap-arktx,
name1 TYPE kna1-name1,
pstlz TYPE kna1-pstlz,
stras TYPE kna1-stras,
ort01 TYPE kna1-ort01,
land1 TYPE kna1-land1,
mbrsh TYPE mara-mbrsh,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF ty_final,
gt_t_final TYPE STANDARD TABLE OF ty_final.
* Internal Table Declaration
DATA: gt_vbakvbap TYPE gt_t_vbakvbap,
gw_vbakvbap TYPE ty_vbakvbap,
gt_kna1 TYPE gt_t_kna1,
gw_kna1 TYPE ty_kna1,
gt_mara TYPE gt_t_mara,
gw_mara TYPE ty_mara,
gt_final TYPE gt_t_final,
gw_final TYPE ty_final,
gt_fcat TYPE slis_t_fieldcat_alv,
gw_fcat TYPE slis_fieldcat_alv,
v_kunnr TYPE vbak-kunnr,
* Sub total based on the header details Sales order no. vbeln = 5006.
gt_sort TYPE slis_t_sortinfo_alv,
gw_sort TYPE slis_sortinfo_alv,
g_tab_lines TYPE i,
e(10) TYPE c,
gv_selected_value(10) TYPE c,
* DOC AND VRM DETAILS.
tab TYPE TABLE OF ty_final.
SELECTION-SCREEN BEGIN OF BLOCK name WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_vbeln FOR vbak-vbeln DEFAULT '5006' TO '5009'.
PARAMETERS : p_kunnr TYPE kna1-kunnr.
SELECTION-SCREEN END OF BLOCK name.
SELECTION-SCREEN BEGIN OF BLOCK name1 WITH FRAME TITLE text-002.
PARAMETERS : r1 RADIOBUTTON GROUP gr1 USER-COMMAND c,
r2 RADIOBUTTON GROUP gr1.
* Selection Screen for Radio button 2
SELECTION-SCREEN
BEGIN OF BLOCK name3 WITH FRAME TITLE text-004.
SELECTION-SCREEN END OF BLOCK name3.
SELECTION-SCREEN END OF BLOCK name1.
INITIALIZATION.
LOOP AT SCREEN .
IF screen-group1 = 'ONE' .
screen-input = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN r1.
LOOP AT SCREEN.
IF
screen-group1 = 'ONE' .
screen-input = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDCASE.
START-OF-SELECTION.
PERFORM f_fetch_ty_vbakbvbap.
PERFORM f_fetch_ty_kna1.
PERFORM f_fetch_ty_mara.
PERFORM f_fetch_ty_final.
PERFORM top_of_page.
* Body of the Email.
PERFORM f_customer_validation.
CASE 'X'.
WHEN r1.
IF gt_final IS NOT INITIAL.
PERFORM f_field_catalog.
PERFORM f_output_display.
ELSE.
MESSAGE 'No Records Exist for the radio button' TYPE 'I'.
ENDIF.
ENDCASE.
*& Form f_fetch_ty_vbakbvbap
* text
* --> p1 text
* <-- p2 text
FORM f_fetch_ty_vbakbvbap .
SELECT vbak~vbeln
vbak~kunnr
vbap~netpr
vbap~posnr
vbap~matnr
vbap~kwmeng
vbap~arktx
INTO TABLE gt_vbakvbap
FROM vbak
INNER JOIN vbap
ON vbak~vbeln = vbap~vbeln
WHERE vbak~vbeln IN s_vbeln.
ENDFORM. " f_fetch_ty_vbakbvbap
*& Form f_fetch_ty_kna1
* text
* --> p1 text
* <-- p2 text
FORM f_fetch_ty_kna1 .
IF gt_vbakvbap[] IS NOT INITIAL.
SELECT kunnr
name1
pstlz
stras
ort01
land1
INTO TABLE gt_kna1
FROM kna1
FOR ALL ENTRIES IN gt_vbakvbap
WHERE kunnr = gt_vbakvbap-kunnr.
ENDIF.
ENDFORM. " f_fetch_ty_kna1
*& Form f_fetch_ty_mara
* text
* --> p1 text
* <-- p2 text
FORM f_fetch_ty_mara .
IF gt_kna1[] IS NOT INITIAL.
SELECT mbrsh
matnr
mtart
matkl
INTO TABLE gt_mara
FROM mara
FOR ALL ENTRIES IN gt_vbakvbap
WHERE matnr = gt_vbakvbap-matnr.
ENDIF.
ENDFORM. " f_fetch_ty_mara
*& Form f_fetch_ty_final
* text
* --> p1 text
* <-- p2 text
FORM f_fetch_ty_final .
SORT gt_kna1 BY kunnr.
LOOP AT gt_vbakvbap INTO gw_vbakvbap.
MOVE: gw_vbakvbap-vbeln TO gw_final-vbeln,
gw_vbakvbap-kunnr TO gw_final-kunnr,
gw_vbakvbap-netpr TO gw_final-netpr,
gw_vbakvbap-posnr TO gw_final-posnr,
gw_vbakvbap-matnr TO gw_final-matnr,
gw_vbakvbap-kwmeng TO gw_final-kwmeng,
gw_vbakvbap-arktx TO gw_final-arktx.
READ TABLE gt_kna1 INTO gw_kna1 WITH KEY kunnr = gw_vbakvbap-kunnr BINARY SEARCH.
IF sy-subrc = 0.
MOVE: gw_kna1-name1 TO gw_final-name1,
gw_kna1-pstlz TO gw_final-pstlz,
gw_kna1-stras TO gw_final-stras,
gw_kna1-ort01 TO gw_final-ort01,
gw_kna1-land1 TO gw_final-land1.
READ TABLE gt_mara INTO gw_mara WITH KEY matnr = gw_vbakvbap-matnr.
MOVE: gw_mara-mbrsh TO gw_final-mbrsh,
gw_mara-mtart TO gw_final-mtart,
gw_mara-matkl TO gw_final-matkl.
APPEND gw_final TO gt_final.
CLEAR gw_final.
ENDIF.
ENDLOOP.
ENDFORM. " f_fetch_ty_final
*& Form f_output_display
* text
* --> p1 text
* <-- p2 text
FORM f_output_display .
DATA:lv_repid TYPE sy-repid.
lv_repid = sy-cprog.
DATA:w_layout TYPE slis_layout_alv.
w_layout-colwidth_optimize = 'X'.
w_layout-zebra = 'X'.
gw_sort-fieldname = 'VBELN'.
gw_sort-tabname = 'GW_FINAL'.
gw_sort-subtot = 'X'.
APPEND gw_sort TO gt_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-cprog
* I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
is_layout = w_layout
it_fieldcat = gt_fcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
it_sort = gt_sort
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_final
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " f_output_display
*& Form f_field_catalog
* text
* --> p1 text
* <-- p2 text
FORM f_field_catalog .
gw_fcat-fieldname = 'VBELN'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Sales Order No'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'KUNNR'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Customer Number'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'NETPR'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Net Price'.
gw_fcat-do_sum = 'X'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'POSNR'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Item Number'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'MATNR'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Material Number'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'KWMENG'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Cumulative Order Quantity'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'ARKTX'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Short text for sales '.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'NAME1'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Customer Name'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'PSTLZ'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Postal Code'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'STRAS'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'House number and street'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'ORT01'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'City'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'LAND1'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Country Key'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'MBRSH'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Industry sector'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'MTART'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Material Type'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
gw_fcat-fieldname = 'MATKL'.
gw_fcat-tabname = 'GT_FINAL'.
gw_fcat-seltext_m = 'Material Group'.
APPEND gw_fcat TO gt_fcat.
CLEAR gw_fcat.
ENDFORM. " f_field_catalog
Maybe you are looking for
-
Update Policy for multiple networks with specific DNS servers
I have a mid size network with 5 locations all with different IP addresses. All sites host their own DNS servers and connect directly through an ISP dedicated VLAN. Main Site 10.1.1.1 255.0.0.0 Remote Site 1 192.168.100.1 255.255.255.0 Remote Site 2
-
My MacBook Pro Retina won't turn on! Yesterday I installed the new updates.
So it's fully charged. I used it without any problems last night, then shut it down. This morning when I tried to turn it on, it won't. I have Lion installed and am up to date with all of the software updates. There is a green light in the AC adapter
-
I'm having Trouble with a Simple Histogram
The program as a whole is supposed to read a text file, count the number of words, and ouput it. For example, "The The The pineapple pineapple" should ouput "The 3, Pineapple 2" I've gotten as far as dumping the tokens into an array and creating 2 em
-
How do I restore the camera function to my Iphone 4? I accidentally deleted the icon from the desktop.
-
I can open files on my desktop and I can only open them by right click then open. Please help ASAP. I am using this MacBook for school. Pls help asap