cancel
Showing results for 
Search instead for 
Did you mean: 

SPECS for z-reports

Former Member
0 Kudos

hi

can anyone provide me with realtime specs for z reports.

like the requirement of the client related to SD module.

I possible giv me the code also.

and one more thing. where do we run the report after created.

kindly help

regs

sridhar

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Send a test mail at shesagiri@gmail.com will send details

Former Member
0 Kudos

Dear Sridhar,

<b>and one more thing. where do we run the report after created.</b>

You would assign a TCode for the report and possibly add it in the user menu. Hence, you can run the report either with transction code or from user menu.

<b>can anyone provide me with realtime specs for z reports.</b>

Functional specification: The Functional Specification is a comprehensive document created after the Software Requirements Document. It provides more details on selected items originally described in the Software Requirements Template. Elsewhre organizations combine these two documents into a single document.

Functional specs is like a templeate document, hence it will be same whether it is AR or AP or CCA. Basically functional specs is a document which explains the requirements with technical details, so that technical consultant or any other person can read and understand what is the background of the report or an extension done in SAP.

The Functional Specification describes the features of the desired functinality. It describes the product's features as seen by the stake holders,and contains the technical information and the data needed for the design and developement.

The functional specs should have the following details:

Background: Information why this report is required and Business process involved in that.

Selection Parameters: This should what fields should be selection fields, which are optional and which are mandatory etc.

Layout of the report: What information is required in the output of the report. This should also indicate the technical names - Table and field names from where the data needs to be fetched.

Detailed Description: This should explain the logic of the report - what calculations needs to be done etc.

The Functional Specification defines what the functionality will be of a particulat area that is to be precise a transaction in SAP terminology.

It also contains the data regarding change history, if any.

Functional Spec is mainly prepared for the purpose of developing the new reports (this happens only when SAP standard report not achieve the client purpose) using the ABAP Program. for ABAPers you need to give the details of the Tables , Fields and the logic how to pick the value and get the report.

Visit the following links:

http://www.sap-img.com/general/what-are-functional-specification-in-sap.htm

http://www.epri.com/eprisoftware/processguide/funcspec.html

<b>I possible giv me the code also.</b>

SD Tables:

http://www.erpgenie.com/abap/tables_sd.htm

Tables:

http://www.erpgenie.com/abap/tables.htm

Code:

TABLES: KNA1,VBAK,VBAP.

TYPE-POOLS: SLIS.

SELECT-OPTIONS: CUST FOR KNA1-KUNNR.

DATA: BEGIN OF ITAB OCCURS 0,

KUNNR LIKE KNA1-KUNNR,

NAME LIKE KNA1-NAME1,

LAND1 LIKE KNA1-LAND1,

END OF ITAB.

DATA: BEGIN OF JTAB OCCURS 0,

VBELN LIKE VBAK-VBELN,

NETWR LIKE VBAK-NETWR,

END OF JTAB.

DATA: BEGIN OF KTAB OCCURS 0,

POSNR LIKE VBAP-POSNR,

MATNR LIKE VBAP-MATNR,

END OF KTAB.

DATA: REPID LIKE SY-REPID,

*INTERNAL TABLE AND STRUCTURE.

*SLIS_T_FIELDCAT_ALV IS AN INTERNAL TABLE.

*SLIS_FIELDCAT_ALV IS AN STRUCTURE.

F_KNA11 TYPE SLIS_T_FIELDCAT_ALV,

F_KNA1 TYPE SLIS_FIELDCAT_ALV,

F_VBAK1 TYPE SLIS_T_FIELDCAT_ALV,

F_VBAK TYPE SLIS_FIELDCAT_ALV,

F_VBAP1 TYPE SLIS_T_FIELDCAT_ALV,

F_VBAP TYPE SLIS_FIELDCAT_ALV,

I_EVENTS TYPE SLIS_T_EVENT,

S_EVENTS TYPE SLIS_ALV_EVENT.

PERFORM GET-VAL.

REPID = SY-REPID.

SELECT KUNNR NAME1 LAND1 FROM KNA1 INTO TABLE ITAB WHERE KUNNR IN

CUST

.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = F_KNA11

IT_EVENTS = I_EVENTS

TABLES

T_OUTTAB = ITAB.

  • GET VAL

FORM GET-VAL.

F_KNA1-FIELDNAME = 'KUNNR'.

F_KNA1-REF_TABNAME = 'KNA1'.

F_KNA1-REF_FIELDNAME = 'KUNNR'.

APPEND F_KNA1 TO F_KNA11.

F_KNA1-FIELDNAME = 'NAME'.

F_KNA1-REF_TABNAME = 'KNA1'.

F_KNA1-REF_FIELDNAME = 'NAME1'.

APPEND F_KNA1 TO F_KNA11.

F_KNA1-FIELDNAME = 'LAND1'.

F_KNA1-REF_TABNAME = 'KNA1'.

F_KNA1-REF_FIELDNAME = 'LAND1'.

APPEND F_KNA1 TO F_KNA11.

F_VBAK-FIELDNAME = 'VBELN'.

F_VBAK-REF_TABNAME = 'VBAK'.

F_VBAK-REF_FIELDNAME = 'VBELN'.

APPEND F_VBAK TO F_VBAK1.

F_VBAK-FIELDNAME = 'NETWR'.

F_VBAK-REF_TABNAME = 'VBAK'.

F_VBAK-REF_FIELDNAME = 'NETWR'.

F_VBAK-DO_SUM = 'X'.

APPEND F_VBAK TO F_VBAK1.

F_VBAP-FIELDNAME = 'POSNR'.

F_VBAP-REF_TABNAME = 'VBAP'.

F_VBAP-REF_FIELDNAME = 'POSNR'.

APPEND F_VBAP TO F_VBAP1.

F_VBAP-FIELDNAME = 'MATNR'.

F_VBAP-REF_TABNAME = 'VBAP'.

F_VBAP-REF_FIELDNAME = 'MATNR'.

APPEND F_VBAP TO F_VBAP1.

S_EVENTS-NAME = 'USER_COMMAND'.

S_EVENTS-FORM = 'VAL'.

APPEND S_EVENTS TO I_EVENTS.

ENDFORM.

FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.

DATA: CUS(10) TYPE N,

SALNO(10) TYPE N,

MAT(10) TYPE C.

  • display lists

IF SEL-FIELDNAME = 'KUNNR'.

CUS = SEL-VALUE.

SELECT VBELN NETWR FROM VBAK INTO TABLE JTAB WHERE KUNNR = CUS.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = F_VBAK1

IT_EVENTS = I_EVENTS

TABLES

T_OUTTAB = JTAB.

ENDIF.

IF SEL-FIELDNAME = 'VBELN'.

SALNO = SEL-VALUE.

SELECT POSNR MATNR FROM VBAP INTO TABLE KTAB WHERE VBELN = SALNO.

CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

I_TITLE = ' ITEM DETAILS'

I_TABNAME = VBAP

IT_FIELDCAT = F_VBAP1

I_CALLBACK_PROGRAM = REPID

IMPORTING

ES_SELFIELD = SEL

TABLES

T_OUTTAB = KTAB.

ENDIF.

IF SEL-FIELDNAME = 'MATNR'.

MAT = SEL-VALUE.

SET PARAMETER ID 'MAT' FIELD MAT.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

ENDIF.

ENDFORM.

                              • Grid Display ***************

TYPE-POOLS: SLIS.

TABLES: KNA1.

*DATA: ITAB TYPE STANDARD TABLE OF ZJKNA1 WITH HEADER LINE.

DATA: BEGIN OF ITAB OCCURS 0,

KUNNR TYPE KUNNR,

NAME1 TYPE KNA1-NAME1,

END OF ITAB.

DATA: JTAB LIKE ITAB OCCURS 0 WITH HEADER LINE.

DATA: IT_TOP TYPE SLIS_T_LISTHEADER.

DATA: W_TOP TYPE SLIS_LISTHEADER.

DATA: IT_EVENT TYPE SLIS_T_EVENT.

DATA: W_EVENT TYPE SLIS_ALV_EVENT.

*

W_EVENT-NAME = 'TOP_OF_PAGE'.

W_EVENT-FORM = 'TOPS'.

APPEND W_EVENT TO IT_EVENT.

*

W_EVENT-NAME = 'USER_COMMAND'.

W_EVENT-FORM = 'UCOM'.

APPEND W_EVENT TO IT_EVENT.

DATA: S_LAYOUT TYPE SLIS_LAYOUT_ALV.

*S_LAYOUT-NO_VLINE = 'X'.

S_LAYOUT-ZEBRA = 'X'.

S_LAYOUT-NO_COLHEAD = ''.

S_LAYOUT-TOTALS_ONLY = 'TL'.

DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.

DATA: W_LISTHEADER TYPE SLIS_LISTHEADER.

W_LISTHEADER-TYP = 'H'.

W_LISTHEADER-KEY = 'THIS IS LIST'.

APPEND W_LISTHEADER TO IT_LISTHEADER.

DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

DATA: W_FIELDCAT TYPE SLIS_FIELDCAT_ALV.

W_FIELDCAT-COL_POS = 1.

W_FIELDCAT-FIELDNAME = 'KUNNR'.

W_FIELDCAT-TABNAME = 'ITAB'.

W_FIELDCAT-SELTEXT_M = 'CUST. NO'.

W_FIELDCAT-HOTSPOT = 'X'.

APPEND W_FIELDCAT TO IT_FIELDCAT.

CLEAR W_FIELDCAT.

W_FIELDCAT-COL_POS = 2.

W_FIELDCAT-FIELDNAME = 'NAME1'.

W_FIELDCAT-TABNAME = 'ITAB'.

W_FIELDCAT-SELTEXT_M = 'CUST. NAME'.

W_FIELDCAT-OUTPUTLEN = 30.

APPEND W_FIELDCAT TO IT_FIELDCAT.

CLEAR W_FIELDCAT.

SELECT KUNNR NAME1 FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE ITAB

UP TO 50 ROWS.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = SY-REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = W_LISTHEADER

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = 'ENJOY.BMP'

  • I_GRID_TITLE = 'THIS IS MY FIRST ALV REPORT'

  • I_GRID_SETTINGS = W_LISTHEADER

IS_LAYOUT = S_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = IT_EVENT

  • 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

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

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.

**&----


*

**& Form TOPS

**&----


    • text

**----


*

    • --> p1 text

    • <-- p2 text

**----


FORM TOPS .

REFRESH IT_TOP.

W_TOP-TYP = 'H'.

*W_TOP-KEY = 'JAGAN'.

W_TOP-INFO = 'THIS IS SAMPLE HEADER'.

APPEND W_TOP TO IT_TOP.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = IT_TOP

I_LOGO = 'IDLOGO1'

  • I_END_OF_LIST_GRID =

.

ENDFORM. " TOPS

*&----


*& Form UCOM

*&----


  • text

*----


  • --> p1 text

  • <-- p2 text

*----


FORM UCOM USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.

DATA: CUS(10) TYPE N VALUE '0000000000'.

CUS = SEL-VALUE.

REFRESH ITAB.

SELECT KUNNR NAME1 FROM KNA1 INTO TABLE ITAB WHERE KUNNR = CUS.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

IT_FIELDCAT = IT_FIELDCAT

  • IT_EVENTS = IT_EVENTS

TABLES

T_OUTTAB = ITAB.

ENDFORM. " UCOM

Regards,

Naveen.

Former Member
0 Kudos

hi naveen,

thank u for the ans.

but i didn't find the actual requirement. like what actually a report should contain.

ex: report shud display the net tax paid on a particular day from all the

billing docs created on a day.

for this i think we hav to take fields from billing doc(vbrk)....

and in initial screen wat r the parameters to b selected?

like ex: date range, sales org, dist ch, div..........

and how to assign the transaction code to this report etc.

if anyone could send me the details in general language, and the code for that

(though not for the above mention one), it could be helpful for me.

regs

sridhar

Former Member
0 Kudos

Hi Sridhar,

In the details provided by me, there will be an initial Screen refers to input Parameter, as per required output. If you check, the input Parameter can be Sales Organization, Distribution Channel, Division, sales office, Sold to party mater, etc for the period specified.

In MainScreen, we can have Header Data & Item Level data. I have also mentioned about Table Joint, which the Abaper will require for linking different tables, so that required data can be captured. This is an possible Sales report, but as per requirement of client, it may vary. This Table Links the complete flow in terms of Project System, Sales Order, Delivery, Billing & Accounting Document.

Ofcourse, I am not an technical person, so I do not know the coding, but as a functional consultant, I require to give the input according, which will be converted by him in terms of coding.

Regards,

Rajesh Banka

Reward suitable points.

Former Member
0 Kudos

Hi Sridhar K,

If you give your exact requirement, it will possible to give some to give you details. Else give your mail ID and any one of us would be able to send a sample FS and you can go ahead and develop Fs for report in similar manner.

Regards

Srini

Former Member
0 Kudos

Dear Sridhar,

<b>report shud display the net tax paid on a particular day from all the

billing docs created on a day.</b>

Tables : VBRK, and VBRP

<b>and in initial screen wat r the parameters to b selected?

like ex: date range, sales org, dist ch, div..........

</b>

TABLES: VBRK.
SELECT-OPTIONS : SO_FKDAT FOR VBRK-FKDAT. "Date Range
PARAMETERS : P_VKORG TYPE VKORG,      "Sales Organization
                         P_VTWEG TYPE VTWEG,      "Distribution Channel
                         P_SPART TYPE SPART.        "Division

<b>and how to assign the transaction code to this report etc.</b>

You would assign the Transaction Code to the report in transaction SE93.

1. In SE93 -> Enter the transaction name that you want to assign

2. Click on Create PushButton

3. Enter short text and choose 'Program and Selection Screen(Report Transaction)' radiobutton

4. Choose continue

5. Enter program name (Selection Screen would be 1000) -> Enter authorization object as per the requirement

6. Save your entries.

Sample Code:

TABLES: vbrk.
DATA : it_vbrk TYPE TABLE OF vbrk.  "You would define only relevant fields and fetch only those in the select statement

SELECT-OPTIONS : so_fkdat FOR vbrk-fkdat. "Date Range
PARAMETERS : p_vkorg TYPE vkorg,      "Sales Organization
                         p_vtweg TYPE vtweg,      "Distribution Channel
                         p_spart TYPE spart.        "Division

SELECT * FROM vbrk                    "You would only fetch relevant fields not *
         INTO TABLE it_vbrk
         WHERE fkdat IN so_fkdat
         AND   vkorg EQ p_vkorg
         AND   vtweg EQ p_vtweg
         AND   spart EQ p_spart.

Regards,

Naveen.

Former Member
0 Kudos

Initial Screen:

Fields | Table-Field | Remark | Table Joint

Sales Organization | VBAK-WAERK | Single Selection

Distribution Channel | VBAK-VTWEG | Multiple Selection

Division | VBAK-SPART | Multiple Selection

Sales office | VBAK-VKBUR | Multiple Selection

Sold to Party | VBPA-KUNNR | Multiple Selection | VBAK-VBELN=VBPA-VBELN

Material | VBAP-MATNR | Multiple Selection | VBAK-VBELN=VBAP-VBELN

WBS Element | VBAP-PS PSP PNR | Multiple Selection | VBAK-VBELN=VBAP-VBELN

Sales Order Type | VBAK-AUART | Multiple Selection

Billing Type | VBRK-FKART | Multiple Selection | VBAK-VBELN=VBFA-VBELV & VBRK-VBELN=VBFA-VBELN

Period

Main Screen:

Header

Sales Organization | VBAK-VKORG

Period

Item Level:

Sold-to-Party | VBPA-KUNNR where VBPA-PARVW = AG

Distribution Channel | VBAK-VKWEG

Division | VBAK-SPART

WBS Element | VBAP-PS_PSP_PNR

Sales Office | VBAK-VKBUR

Sales Doc type | VBAK-AUART

Sales Doc No | VBAK-VBELN

Material | VBAP-MATNR

Mat Desc | VBAP-ARKTX

Qty | VBAP-KWMENG

UOM | VBAP-MEINS

Doc Currency | VBAK-WAERK

Delivery No | LIKP-VBELN

Billing Document Type | VBRK-FKART

Billing Document No | VBRK-VBELN

Billing Document Line No | VBRP-POSNR

Quantity | VBRP-FKIMG

Price - Base Price

Price - Service Tax

Price - Education Cess

Price - VAT

Price - Other taxes

Price - Total

Accounting Document Number | BKPF-BELNR

Table Joints at Item Level:

VBAK-VBELN = VBPA-VBELN

VBAK-VBELN = VBAP-VBELN

VBAK-VBELN = VBFA-VBELV (For Delivery)

VBAK-VBELN = VBFA-VBELV

LIKP-VBELN = VBFA-VBELV

VBRK-VBELN = VBRP-VBELN

VBRK-XBLNR = BKPF-XBLNR

  • some details are missing, please try to identify & use it as per your requirement.

Regards,

Rajesh Banka

Reward Points if Helpful