Using Standard SAP Tables in SAP Tables, clusters or functions connections
Hi Gurus,
I am trying to use Standard SAP table like MARA, MAKT.. etc. in my crystal designer. When i make a new connection using SAP tables, Cluster or Functions, these tables are not listed.
Any configuration i have to maintain to list those standard table.?
With Regards,
Balachander.S
Due to performance reasons there is a limitation regarding the number of the dispplayed table names. Once you are in the connection/table browser select a table and invoke the context menu by pressing the right mouse button. Select Options and in the options panel you can use wildcards in order to limit the results to the desired range (eg. use MA% to get a list of tables starting with MA). After you close the options panel press F5 and expand the connection entry again.
Regards,
Stratos
Similar Messages
-
How to use standard SAP stylesheets in WAD
Hello ,
I created a new Web template.
Assigned a data provider, inserted a table.
In order to view i include a Analaysis box in one of the cell of Table.
Now i need to change the colours of result rows.
How to use Standard Stylesheets provided by SAP.
Where this stylesheets will be located
Under which properties.
How to use those.
How to edit those and save as we wanted.
An y step by step documents, please send it to [email protected]
I want to include Information button in Template, so when executing if user click this button he/she should know,
What are provided variables and if they chosen some specific variable restriction to see the result,
Also by default this information should get print.
In standard sap portal, this button is located on upper right corner.
Please advise.Thanks Rusty,
Thats exactly right,
I included a naviagtion block and it worked well
But while printing the query on Web template, It only prints the data that is coming in Analysis block.
Similarly while running the query thru BEX to Portal,
Navigation block is on left, but while printing it prints exactly every data in Information tab.
Information is the button located on upper right corner.
If you click, it will give you information such as , which restrictions u did, which extra filters you added everything.
And while printing it prints this information too.
I want to do the same designing for my custom Web template.
How can i do that.
I already added navigation block, so it will be easy for users to drag and drop Chars and KFs in rows and columns as well as filter if they needed.
I hope you are trying to understand.
Also for using stylesheets can you suggest.
So that i can make changes to row and columns.
I am unable to locate stylesheet in any of the properties. -
How to use table control wizard using standard SAP structure.
Hi ,
I'm working on one project...
I have created my own program, where we generate sequence of numbers. This output is displayed in the table control and when i save it saves in my user defined database table.
Now i'm trying and using standard structure in table control wizard to view the data... Table control wizard is not working if we define structure..
Please help me out with the solution.
Thanks and Regards in advance.
A. RafiquePlease explain as to what u mean by standard structure in the table control, when u r trying to view the data, are u trying to populate the internal table that you are feeding to the screen structure with the entries that you want to display?
-
How and where does SAP standard programs update the master tables...
Hello there,
How and where does SAP standard programs update the master tables...
to be precise.. if a (any) transaction occurs the programs behind it holds the data in temporary structures.
where and when does it get updated in the master table.
can anyone tell me how it happens?
I Know that from the where used list one can find the corresponding table but most of the time it wont suffice
I am expecting a proper answer.
Santosh BHello Santosh,
you need to do some self-reading on the following topic
Updates in the SAP System (BC-CST-UP)
http://help.sap.com/saphelp_47x200/helpdata/en/e5/de86e135cd11d3acb00000e83539c3/frameset.htm
Regards,
Siddhesh -
SAP Patch :'Error reading the standard sequence from the document tables
Hi Experts,
Please help!
Recently SAP patching is carried out in our R/3 environments. Before patching, all our customized RFCs were working correctly.
We are using BAPI ''BAPI_ALM_ORDER_GET_DETAIL' in a RFC. After the patching, the version date of the BAPI ''BAPI_ALM_ORDER_GET_DETAIL' is changed to new date of patching.
Now, when we are calling the customized RFC, ''BAPI_ALM_ORDER_GET_DETAIL' is returning an error 'Error reading the standard sequence from the document tables'.
This comes when we are pasiing any order with Order type 'ZM02' ( Maintenance Order - Preventative). It is working absolutely fine with Order Type ZM01(Maintenance Order - In Hours Opex).
Sometime, when RFC is run individually, it works fine with same data and sometime it is throwing this error with the same data. Very Inconsistent.
Please advice whether patching is the reason.
Any advice..is welcomed.
Many Thanks,
RohitWe found that the flow of the code(RFC) was making a situation where even correct order id was passed to this BAPI, the result was an error 'Error reading the standard sequence from the document tables'. we reverted the RFC to it's earlier version. now that problem is not there.
-
Query regarding Standard table vs Z-table in SAP about deletion of data?
Dear Experts,
Can we delete the data form the standard table in SAP. If yes than will it ask for the request to make them effective itself, because when we delete the data from any ztable, it will not ask for the request to make them effective at the produstion server ? If possible plz update me with yr elaborate and detailed concerneds.
Regards,
AkgSorry to intervene here Dhina but that is just halfways correct.
If delivery class NOT = C then it is NOT a customizing table and therefore you wont get any transport request updating or deleting data from it.
But if it is a customizing table then you got to look for the recording routine. You can see this by viewing your table in SE11, then using the menu like following:
utilities->table maintainance generator.
Then look at the info in the bottowm frame. if "standard recording routine" is tagged, then you get a transport request.
If the other option is tagged you wont get it. What again means you can customize this table directly in the system where you need those entries.
why is that?
well assume there is a customizing for e.G. materials, depending on materialnumber. If that table would have a standard recording routine you would need ALL your materials in your development system which would be quite unusual.
Edited by: Florian Kemmer on Jun 9, 2011 2:00 PM
some typos corrected, left some for sure -
How to Send Internal table to SAP Spool using Function Modules or Methods?
Hi Experts,
How to Send Internal table to SAP Spool using Function Modules or Methods?
Thanks ,
KiranThis is my code.
I still get the no ABAP list data for the spool, even tho I can see it sp01?
REPORT Z_MAIL_PAYSLIP.
* Declaration Part *
tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
infotypes: 0000, 0001, 0105, 0655.
data: begin of ITAB occurs 0,
MTEXT(25) type C,
PERNR like PA0001-PERNR,
ABKRS like PA0001-ABKRS,
ENAME like PA0001-ENAME,
USRID_LONG like PA0105-USRID_LONG,
end of ITAB.
data: W_BEGDA like HRPY_RGDIR-FPBEG,
W_ENDDA like HRPY_RGDIR-FPEND.
data: RETURN like BAPIRETURN1 occurs 0 with header line.
data: P_INFO like PC407,
P_FORM like PC408 occurs 0 with header line.
data: P_IDX type I,
MY_MONTH type T549Q-PABRP,
STR_MY_MONTH(2) type C,
MY_YEAR type T549Q-PABRJ,
STR_MY_YEAR(4) type C,
CRLF(2) type x value '0D0A'.
data: W_CMONTH(10) type C.
data: TAB_LINES type I,
ATT_TYPE like SOODK-OBJTP.
data: begin of P_INDEX occurs 0,
INDEX type I,
end of P_INDEX.
constants: begin of F__LTYPE, "type of line
CMD like PC408-LTYPE value '/:', "command
TXT like PC408-LTYPE value 's', "textline
end of F__LTYPE.
constants: begin of F__CMD, "commands
NEWPAGE like PC408-LINDA value '',
end of F__CMD.
data: P_LIST like ABAPLIST occurs 1 with header line.
*data: OBJBIN like SOLISTI1 occurs 10 with header line,
data: OBJBIN like LVC_S_1022 occurs 10 with header line,
DOCDATA like SODOCCHGI1,
OBJTXT like SOLISTI1 occurs 10 with header line,
OBJPACK like SOPCKLSTI1 occurs 1 with header line,
RECLIST like SOMLRECI1 occurs 1 with header line,
OBJHEAD like SOLISTI1 occurs 1 with header line,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_buffer type string,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname.
data: file_length type int4,
spool_id type rspoid,
line_cnt type i.
*-------------------------------------------------------------------* * INITIALIZATION *
OBJBIN = ' | '.
append OBJBIN.
OBJPACK-HEAD_START = 1.
data: S_ABKRS like PV000-ABKRS.
data: S_PABRP like T549Q-PABRP.
data: S_PABRJ like T549Q-PABRJ.
* SELECTION SCREEN *
selection-screen begin of block BL1.
parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
selection-screen end of block BL1.
START-OF-SELECTION.
s_ABKRS = PNPXABKR.
S_PABRP = PNPPABRP.
s_pabrj = PNPPABRJ.
w_begda = PN-BEGDA.
w_endda = PN-ENDDA.
get pernr.
* "Check active employees
rp-provide-from-last p0000 space pn-begda pn-endda.
CHECK P0000-STAT2 IN PNPSTAT2.
* "Check Payslip Mail flag
rp-provide-from-last p0655 space pn-begda pn-endda.
CHECK P0655-ESSONLY = 'X'.
rp-provide-from-last p0001 space pn-begda pn-endda.
* "Find email address
RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
if p0105-usrid_LONG ne ''.
ITAB-PERNR = P0001-PERNR.
ITAB-ABKRS = P0001-ABKRS.
ITAB-ENAME = P0001-ENAME.
ITAB-USRID_LONG = P0105-USRID_LONG.
append itab.
clear itab.
endif.
"SY-UCOMM ='ONLI'
END-OF-SELECTION.
*------------------------------------------------------------------* start-of-selection.
write : / 'Payroll Area : ', S_ABKRS.
write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
write : / 'System Time : ', SY-UZEIT.
write : / 'User Name : ', SY-UNAME.
write : / SY-ULINE.
sort ITAB by PERNR.
loop at ITAB.
clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
* Retrieve Payroll results sequence number for this run
select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
and FPBEG ge W_BEGDA
and FPEND le W_ENDDA
and SRTZA eq 'A'.
* Produce payslip for those payroll results
if SY-SUBRC = 0.
call function 'GET_PAYSLIP'
EXPORTING
EMPLOYEE_NUMBER = ITAB-PERNR
SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
PAYSLIP_VARIANT = PAY_VAR
IMPORTING
RETURN = RETURN
P_INFO = P_INFO
TABLES
P_FORM = P_FORM.
check RETURN is initial.
* remove linetype from generated payslip
loop at p_form.
objbin = p_form-linda.
append objbin.
line_cnt = line_cnt + 1.
endloop.
file_length = line_cnt * 1022.
* create spool file of paylsip
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = file_length
IMPORTING
e_spoolid = spool_id
TABLES
it_textdata = objbin.
IF sy-subrc EQ 0.
WRITE spool_id.
ENDIF.
DESCRIBE table objbin.
DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = spool_id
NO_DIALOG = ' '
DST_DEVICE = 'MAIL'
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT = l_no_of_bytes
* PDF_SPOOLID = l_pdf_spoolid
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
PDF = pdf
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Download PDF file C Drive
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\itab_to_pdf.pdf'
filetype = 'BIN'
TABLES
data_tab = pdf.
* Transfer the 132-long strings to 255-long strings
* LOOP AT pdf.
* TRANSLATE pdf USING ' ~'.
* CONCATENATE gd_buffer pdf INTO gd_buffer.
* ENDLOOP.
* TRANSLATE gd_buffer USING '~ '.
* DO.
* it_mess_att = gd_buffer.
* APPEND it_mess_att.
* SHIFT gd_buffer LEFT BY 255 PLACES.
* IF gd_buffer IS INITIAL.
* EXIT.
* ENDIF.
* ENDDO.
OBJHEAD = 'Objhead'.
append OBJHEAD.
* preparing email subject
concatenate W_ENDDA(6)
' Payslip-'
ITAB-ENAME+0(28)
ITAB-PERNR+4(4) ')'
into DOCDATA-OBJ_DESCR.
DOCDATA-OBJ_NAME = 'Pay Slip'.
DOCDATA-OBJ_LANGU = SY-LANGU.
OBJTXT = 'Pay Slip.'.
append OBJTXT.
*prepare email lines
OBJTXT = DOCDATA-OBJ_DESCR.
append OBJTXT.
OBJTXT = 'Please find enclosed your current payslip.'.
append OBJTXT.
* Write Attachment(Main)
* 3 has been fixed because OBJTXT has fix three lines
read table OBJTXT index 3.
* DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
clear OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = 3.
OBJPACK-DOC_TYPE = 'RAW'.
append OBJPACK.
* Create Message Attachment
ATT_TYPE = 'PDF'.
describe table OBJBIN lines TAB_LINES.
read table OBJBIN index TAB_LINES.
* OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = ATT_TYPE.
OBJPACK-OBJ_NAME = 'ATTACHMENT'.
OBJPACK-OBJ_DESCR = 'Payslip'.
append OBJPACK.
* Create receiver list refresh RECLIST.
clear RECLIST.
RECLIST-RECEIVER = itab-USRID_long.
translate RECLIST-RECEIVER to lower case.
RECLIST-REC_TYPE = 'U'.
append RECLIST.
* Send the document
*SO_NEW_DOCUMENT_ATT_SEND_API1
call function 'SO_DOCUMENT_SEND_API1'
exporting
DOCUMENT_DATA = DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
tables
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = pdf
CONTENTS_TXT = OBJTXT
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
RECEIVERS = RECLIST
exceptions
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
others = 8.
if SY-SUBRC NE 0.
ITAB-MTEXT = 'Message Not Sent to : '.
else.
ITAB-MTEXT = 'Message Sent to : '.
endif.
* else.
* ITAB-MTEXT = 'Message Not Sent to : '.
* endif.
else.
"SY-SUBRC Not = 0
ITAB-MTEXT = 'Payroll data not found : '.
endif.
"end of SY-SUBRC = 0.
modify ITAB.
endloop. "end loop at ITAB
sort ITAB by MTEXT PERNR.
loop at ITAB.
at new MTEXT.
uline.
write : / ITAB-MTEXT color 4 intensified on.
write : / 'Emp. Code' color 2 intensified on,
12 'Emp. Name' color 2 intensified on,
54 'Email ID' color 2 intensified on.
endat.
write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
endloop. -
Why we use Cluster Tables in SAP Hr
hai friends, i am new to ABAP-HR and SAP HR, Actually i am core abaper ( working on SD, MM and Fi Modules ) , can any one explain me why and what is the use of Cluster tables in SAP HR, why we use in SAP HR function Module ?
Thnx in advance
VijayaHi Vijaya,
This may help for ur question..
Why cluster table:
Cluster tables combine the data from several tables with identical (or almost identical) keys into one physical record on the database.
Data is written to a database in compressed form.
Retrieval of data is very fast if the primary key is known.
Cluster tables are defined in the data dictionary as transparent tables.
External programs can NOT interpret the data in a cluster table.
Special language elements EXPORT TO DATABASE, IMPORT TO DATABASE and DELETE FROM DATABASE are used to process data in the cluster tables.
PCL1 - Database for HR work area; (long text, etc)
PCL2 - Accounting Results (time, travel expense and payroll); (payroll results)
PCL3 - Applicant tracking data;
PCL4 - Documents, Payroll year-end Tax data (change logs, etc) -
Transport table entries sap to sap using rfc
Hi Guru's,
I want to write a program for update one table entries of sap system to onother table of sap system using RFC establishment.
If you have any example code kindly give it to me.
Thanks & Regards,
Lakshman.annamaneniHi,
POST - 1
Fisrt create RFC Destination in SM59 between sender & receiver system.
*Sender System:*
FUNCTION XX_RFC_READ_SPFLI.
*"*"Local Interface:
*" IMPORTING
*" VALUE(CARRID) LIKE SPFLI-CARRID
*" VALUE(CONNID) LIKE SPFLI-CONNID
*" EXPORTING
*" VALUE(EX_SPFLI) LIKE SPFLI STRUCTURE SPFLI
*" VALUE(SYS) LIKE SY-SYSID
*" EXCEPTIONS
*" INVALID_DATA
SELECT SINGLE * FROM spfli INTO spfli_workarea
WHERE carrid = carrid
AND connid = connid.
IF sy-subrc EQ 0.
ex_spfli = spfli_workarea.
ELSE.
RAISE invalid_data.
ENDIF.
Sys = sy-sysid.
ENDFUNCTION.
*NEXT: create a Prog.*
REPORT XX_RFC_Tutorial.
Global Data Declaration
TABLES: spfli.
PARAMETERS: p_carrid LIKE spfli-carrid DEFAULT 'LH',
p_connid LIKE spfli-connid DEFAULT '400'.
DATA: SYSTEM LIKE SY-SYSID.
* Calling the Function
CALL FUNCTION 'XX_RFC_READ_SPFLI'
EXPORTING
carrid = p_carrid
connid = p_connid
IMPORTING
ex_spfli = spfli
sys = system
EXCEPTIONS
invalid_data = 1.
* Handling Exceptions
CASE sy-subrc.
WHEN 1.
WRITE 'No data available'.
EXIT.
ENDCASE.
* Displaying Results
WRITE: spfli-carrid,
spfli-connid,
spfli-cityfrom,
spfli-cityto,
spfli-deptime,
spfli-arrtime.
See the next post for Receiver System:
Anil. -
How to back up a table in SAP?Is there tcode to use?
How to back up a table in SAP?Is there tcode to use?
Please suggest me.
Sai.Hello Sai
I do not think there is a specific "backup" transaction available.
For the purpose of backing up a couple of customer tables I used the following approach:
(1) Create a workbench request with all required tables (object entries: R3TR TABU <name of table>; key: '' for client-independent or '<client>' for client-dependent tables.
Export the request.
(2) Write a report which creates a new workbench request and copies the object list of (1) to this new request. Finally the request is released.
(3) Schedule the report as daily batch job. Thus, your latest backup is less than 24 hours old.
The nice thing about this approach is that if you need to backup additional tables: just add the object entries and keys to the request in (1). No changes are required in (2) or (3).
Regards
Uwe -
How i can keep my code after %dba standard table in sap query
hi expert,
how i can keep my code after %dba standard table in sap query..
add 1 to %count-VBRP.
%linr-VBRP = '01'.
extract %fg01.
%linr-VBRP = '02'.
extract %fg02.
%linr-VBRP = '04'.
extract %fg04.
%linr-VBRP = '05'.
extract %fg05.
%ext-VBRP05 = 'X'.
extract %fgwrVBRP05.
endselect.
i want keep my code after filling the standard table generated by sap abap query
Thanks & regards
Sajad AhmadHi,
the above code is excuted succesfully, but if i have
return "Navigation" ;
it is not working
any idea why?????????? -
Export data for the table of SAP using the JCO
Good Morning,
Sorry error of the agreement, and that I am using a translator.
I am needing of help, to solve a problem that I have to integrate the system in Java using the SAP JCO.
Well I need send (Export_Parameter) data into a table in SAP,but I do not know this process.
If someone went through that and can help, thank you in advance
Obs : Not found documents that help me
Att
Elton C.This is a forum for problems with the Java language and the default libraries that come with it. We can't help you with any third-party applications/libraries such as SAP and JCO.
Sorry. -
How to make use of a global internal table in SAP BW during transfer rules
HI friends,
I am ABAP consultant working on some APO info cubes. I have an issue during the upload of planning area data into APO info cube.
Please help.
I am using a transfer routine to find the TECHWEEK from a data base table ZGC_CALWEEK based on the on the calender month and calender week.
Code I am writing is like below.
* FORM COMPUTE_/BIC/ZCALWEEK
* Compute value of InfoObject ZCALWEEK
* in communication structure /BIC/CSZT6DPPA
* Technical properties:
* field name = /BIC/ZCALWEEK
* data element = /BIC/OIZCALWEEK
* data type = NUMC
* length = 000006
* decimals = 000000
* ABAP type = N
* ABAP length = 000006
* reference field =
* Parameters:
* --> RECORD_NO Record number
* --> TRAN_STRUCTURE Transfer structure
* <-- RESULT Return value of InfoObject
* <-> G_T_ERRORLOG Error log
* <-- RETURNCODE Return code (to skip one record)
* <-- ABORT Abort code (to skip whole data package)
FORM COMPUTE_/BIC/ZCALWEEK
USING RECORD_NO LIKE SY-TABIX
TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
G_S_MINFO TYPE RSSM_S_MINFO
CHANGING RESULT TYPE /BIC/OIZCALWEEK
G_T_ERRORLOG TYPE rssm_t_errorlog_int
RETURNCODE LIKE SY-SUBRC
ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
*$*$ begin of routine - insert your code only below this line *-*
* DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
DATA: LV_WEEK TYPE ZGC_CALWEEK-APOWEEK,
LV_MONTH TYPE ZGC_CALWEEK-APOMONTH,
LV_TECH_WEEK TYPE ZGC_CALWEEK-TECHWEEK.
LV_WEEK = TRAN_STRUCTURE-CALWEEK.
LV_MONTH = TRAN_STRUCTURE-CALMONTH.
SELECT SINGLE TECHWEEK INTO LV_TECH_WEEK
FROM ZGC_CALWEEK CLIENT SPECIFIED
WHERE MANDT = SY-MANDT
AND APOWEEK = LV_WEEK
AND APOMONTH = LV_MONTH.
IF SY-SUBRC IS INITIAL.
RESULT = LV_TECH_WEEK.
ELSE.
RETURNCODE = 1.
ENDIF.
*$*$ end of routine - insert your code only before this line *-*
ENDFORM.
There are more than 50-80 million records that wil be transferred from planning area to info cube. The select statment is giving pathetic performance as this has to run 50-80 million times.
After adding the select statment to find the TECHWEEK it is taking 4 times the time that used to take before writing the select statment.
Is there a way that I can first fetch the data from ZGC_CALWEEK to one internal table and that internal table can be used using read statment during the transfer routine instead of writing select statement here.
Please help in this case?Hi Ashutosh,
Thanks for the reply,
The structure of the ZGC_CALWEEK is as below. I have already created a secondary index on the table for this table for the fields APO WEEK and APO MONTH. This didn't help much on the performance.
I am also planning to keep the ZGC_CALWEEK database table to be fully buffered and this may definitely improve the performance but I need to reduce the data base hits as less as possible.
MANDT MANDT CLNT 3 0 Client
TECHWEEK ZTECHWEEK NUMC 6 0 Technical Week
FROMDATE_TECH DATUM DATS 8 0 Date
TODATE_TECH DATUM DATS 8 0 Date
APOWEEK /BI0/OICALWEEK NUMC 6 0 Calendar year / week
FROMDATE_APO DATUM DATS 8 0 Date
TODATE_APO DATUM DATS 8 0 Date
APOMONTH /BI0/OICALMONTH NUMC 6 0 Calendar year/month
The table ZGC_CALWEEK is in APO system, where the transfer rules are being executed.
As you mentioned START ROUTINE, In the start routine Can I create an internal table let's say GT_CALWEEK with structure ZGC_CALWEEK and pull all the records (I have a max of 2000 records in this table) from ZGC_CALWEEK to GT_CALWEEK and Can I used the same internal table GT_CALWEEK in the transfer routine to read the TECHWEEK from internal table.
Thank you very much again for you reply. Any help regarding this would be greatly appreciated.
Best regards,
Siva -
Hi all,
what are the cluster tables in SAP.
and shall we use inner join statment on cluster tables.
regards,
SureshHI,
<b>CLUSTER Tables :-</b>Table clusters (clusters) are special table types in the ABAP Dictionary
The data from several tables is stored together in a table pool or table cluster. Tables assigned to a table pool or table cluster are referred to as pooled tables or cluster tables.
Table pool or table cluster should be used exclusively for storing internal control information (screen sequences, program parameters, temporary data, continuous texts such as documentation). Data of commercial relevance is usually stored in transparent tables.
Can check this link for more clarity
http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
<b>We can't use inner join on clustor table.
To Join cluster table with other table its better use
several select statements.</b>
This one sample code to join cluster table with other transperant table.
In this bseg is a cluster table.
Check it out.
TABLES : bkpf,
bseg.
INTERNAL TABLE AND WORK AREA FOR THE FIELDS IN BKPF TABLE *
DATA : BEGIN OF itab_bkpf OCCURS 0,
bukrs LIKE bkpf-bukrs, "Company Code.
gjahr LIKE bkpf-gjahr, "Fiscal Year.
budat LIKE bkpf-budat, "Posting Date in the Document.
belnr LIKE bkpf-belnr, "Accounting document number.
blart LIKE bkpf-blart, "Document Type.
END OF itab_bkpf.
DATA : wa_bkpf LIKE LINE OF itab_bkpf.
INTERNAL TABLE AND WORK AREA FOR THE FIEDLS IN BSEG TABLE *
DATA : BEGIN OF itab_bseg_debit OCCURS 0,
bukrs LIKE bseg-bukrs, "Company Code.
gjahr LIKE bseg-gjahr, "Fiscal Year.
belnr LIKE bseg-belnr, "Accounting Document Number.
buzei LIKE bseg-buzei, "Line Item.
hkont LIKE bseg-hkont, "General Leadger Account.
shkzg LIKE bseg-shkzg, "Credit/Debit Indicator.
wrbtr LIKE bseg-wrbtr, "Amount in Document Currency.
pswsl LIKE bseg-pswsl, "Update Currency for Gen.Ledger
dmbtr LIKE bseg-dmbtr, "Amount in local currency.
sgtxt LIKE bseg-sgtxt, "Item Text.
zuonr LIKE bseg-zuonr, "Assignment Number.
END OF itab_bseg_debit.
DATA : itab_bseg_credit LIKE STANDARD TABLE OF itab_bseg_debit WITH
HEADER LINE.
FINAL OUTPUT INTERNAL TABLE *
DATA : BEGIN OF itab_output OCCURS 0,
belnr(08),
bukrs(04),
budat LIKE bkpf-budat,
buzei(03),
hkont(07),
blart(02),
shkzg(01),
wrbtr(08),
pswsl(05),
dmbtr(10),
sgtxt(19),
zuonr(10),
END OF itab_output.
CONSTANTS : c_debit TYPE c VALUE 'S',
c_credit TYPE c VALUE 'H'.
SELECT-OPTIONS *
SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-t01.
SELECT-OPTIONS : s_bukrs FOR bkpf-bukrs.
PARAMETERS : p_year LIKE bkpf-gjahr.
SELECT-OPTIONS : s_budat FOR bkpf-budat,
s_dbacct FOR bseg-hkont,
s_cracct FOR bseg-hkont,
s_amt FOR bseg-dmbtr.
SELECTION-SCREEN END OF BLOCK input.
SELECTING RECORDS FROM BKPF TABLE BASED ON THE CONDITION *
SELECT bukrs gjahr budat belnr blart
FROM bkpf INTO TABLE itab_bkpf
WHERE bukrs IN s_bukrs AND
gjahr EQ p_year AND
budat IN s_budat.
SELECTING DEBIT LINE ITEMITEMS FROM BSEG FOR THE DOCUMENT *
NUMBER SELECTED FROM BKPF *
IF NOT itab_bkpf[] IS INITIAL.
SELECT bukrs gjahr belnr buzei
hkont shkzg wrbtr pswsl
dmbtr sgtxt zuonr
FROM bseg INTO TABLE itab_bseg_debit
FOR ALL ENTRIES IN itab_bkpf
WHERE bukrs EQ itab_bkpf-bukrs AND
belnr EQ itab_bkpf-belnr AND
gjahr EQ itab_bkpf-gjahr AND
hkont IN s_dbacct AND
shkzg EQ c_debit AND
dmbtr IN s_amt.
SELECTING CREDIT LINE ITEMITEMS FROM BSEG FOR THE DOCUMENT *
NUMBER SELECTED FROM BKPF *
SELECT bukrs gjahr belnr buzei
hkont shkzg wrbtr pswsl
dmbtr sgtxt zuonr
FROM bseg INTO TABLE itab_bseg_credit
FOR ALL ENTRIES IN itab_bkpf
WHERE bukrs EQ itab_bkpf-bukrs AND
belnr EQ itab_bkpf-belnr AND
gjahr EQ itab_bkpf-gjahr AND
hkont IN s_cracct AND
shkzg EQ c_credit AND
dmbtr IN s_amt.
ENDIF.
SORT itab_bkpf BY bukrs gjahr belnr.
SORT itab_bseg_credit BY bukrs gjahr belnr.
LOOPING THE DEBIT ENTRIES
LOOP AT itab_bseg_debit.
READING THE CREDIT ENTRIES WHICH MATCHES WITH HE CURRENT DOC. NUMBER
READ TABLE itab_bseg_credit WITH KEY
bukrs = itab_bseg_debit-bukrs
gjahr = itab_bseg_debit-gjahr
belnr = itab_bseg_debit-belnr BINARY SEARCH.
IF sy-subrc EQ 0.
*READING THE POSTING DATE AND DOCUMENT TYPE FOR THE CURRENT DOUCMENT
AND APPENDING THE DEBIT AND CREDIT ENTRIES
READ TABLE itab_bkpf INTO wa_bkpf WITH KEY
bukrs = itab_bseg_debit-bukrs
gjahr = itab_bseg_debit-gjahr
belnr = itab_bseg_debit-belnr BINARY SEARCH.
itab_output-belnr = itab_bseg_debit-belnr.
itab_output-bukrs = itab_bseg_debit-bukrs.
itab_output-budat = wa_bkpf-budat.
itab_output-buzei = itab_bseg_debit-buzei.
itab_output-hkont = itab_bseg_debit-hkont.
itab_output-blart = wa_bkpf-blart.
itab_output-shkzg = itab_bseg_debit-shkzg.
itab_output-wrbtr = itab_bseg_debit-wrbtr.
itab_output-pswsl = itab_bseg_debit-pswsl.
itab_output-dmbtr = itab_bseg_debit-dmbtr.
itab_output-sgtxt = itab_bseg_debit-sgtxt.
itab_output-zuonr = itab_bseg_debit-zuonr.
APPEND itab_output.
itab_output-belnr = itab_bseg_credit-belnr.
itab_output-bukrs = itab_bseg_credit-bukrs.
itab_output-budat = wa_bkpf-budat.
itab_output-buzei = itab_bseg_credit-buzei.
itab_output-hkont = itab_bseg_credit-hkont.
itab_output-blart = wa_bkpf-blart.
itab_output-shkzg = itab_bseg_credit-shkzg.
itab_output-wrbtr = itab_bseg_credit-wrbtr.
itab_output-pswsl = itab_bseg_credit-pswsl.
itab_output-dmbtr = itab_bseg_credit-dmbtr.
itab_output-sgtxt = itab_bseg_credit-sgtxt.
itab_output-zuonr = itab_bseg_credit-zuonr.
APPEND itab_output.
ENDIF.
ENDLOOP.
Reward if it helps you.
Thanks. -
Standard program to display which tables are used by Webdynpro ABAP program
Hi Gurus,
I am working on a couple of enhancements in SAP Promotion Management for Retail (SAP PMR) which works on the principle of Floor Plan Management.
I was wondering if anyone would know of a standard program to display the tables used by Webdynpro ABAP?
(or)
Where can I get info of SAP Tables associated to SAP PMR?Hi,
I am not aware of any standard reports that displays the tables.
If I have to view the tables, I would go to se80, give the package and view all the tables in the package.
Regards,
Daz.
Maybe you are looking for
-
How can i stream some files via my macbook pro
how can i stream some files via my macbook pro and my WD TV LIVE
-
New to LR 5.2 Running OS X 10.8.5. Tried to save image in file folder. Now get this message at top of all images in Library: "File could not be found." How do I fix this?
-
Client automatically cache the data got from cache server?
Hi expert, I have 2 questions about the client local cache. Would you please help to give me some suggestion? 1. Will client automatically locally cache the data got from cache server the first time and automatically update the data in local cache wh
-
The output sound volume on my system (about one month old imac) sounds low. As I remember my old G5 imac playing sounds on a webpage with system volume (the top line on the screen) and browser volume (set within the browser) at a very load volume. No
-
Hi together, My challenge is to start an OWB workflow from an apex procedure. Procedure: declare numb number; audit_id number; begin numb := rtruser_blueprint.exec_api.execute('LOC_A014_OWF_MGR', 'PROCESS', 'LOAD_CALM_DELIVERY', ',', 'DELIVERY_ID_IN=