LO Extraction Doubt
Hello SDN,
I have doubt
1) I am using LO Extraction for SD using Delta Extraction. evry day loading works ok, suddenly we realised that some datas are missing in BW from R3. How will i get those missed records from R3. is it in LBWQ? if so how we trigger to BW?
2) IN SD am using Header and Item Line for last 6 months suddenly there is a requirement for Schedule line Items in this case do we need to delete the setup tables for application 11, If so what would be the steps do we have to stop previous extraction?
3) ODS1 is using 3 characteristics now there is a need to use 4th character say Data field in this case is it possible in ODS1 itself by doing repair full Req.?
Please suggest me answers to any of these qns is appreciated with Points.
Regards
Mahesh.N
Hi,
1. Try to find if you missed out some deltas, if yes then see if its in PSA and reload.
If its not there, then you need to perform a Full repair for those records after filling the setup tables with those records.
2. You dont have to stop the current deltas for filling setup tables. Only thing is that you need to stop R3 postings during that time.
You will need to fill the set up tables in 'no postings period'. In other words when no trasnactions are posted for that area in R/3 otherwise those records will not come to BW. Discuss this with end user and decide. Weekends are a general choice for this activity.
You can run them after business hours so that there wont be any transactions, or in the night times or you can do it on week ends so that there is no need to take down time.
Fill the setup tables with already closed values and then fill up again with open values.This will reduce the down time.
How To
Minimize Downtime For Delta Initialization
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d51aa90-0201-0010-749e-d6b993c7a0d6
How To Minimize Effects of Planned Downtime (NW7.0)
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/901c5703-f197-2910-e290-a2851d1bf3bb
3. Remodeling wont work for ODS.
You can try creating a copy of this ODS and load data into that.
Hope this helps.
Thanks,
JituK
Similar Messages
-
hai to every body,
i have an doubt on lis and lo extraction
In lis extraction we have an information structure(IS).before extraction we all delete the contents of IS.Then by scheduling the v1 or v2 job we update data from database tables to IS by running statistical setup.
but in los we have an setup tables.before extractiopn we all delete data from setup tables.then by running statistical setup we fill the setup tables with dtatbse data.
which job(v1 or v2) scheduling between databse tables and setup tablesHi uday,
To tell you, we wont delete the content of Information Structure in LIS, Because, in LIS, whenever,a user do a transaction, that record will automatically updated in the Information structure.
Where as, if you consider LO, whenever, a user generates a transaction, that records wont be updated in the setup tables, they are directly moved to delta tables(like RSA7 etc). Only when you do statistical setup, this setup tables are updated, later on these tables are not updated, unlike LIS.
Only for this, we wont delete the information structure everytime,where as LO we delete the setup tables whenever we do init.
Thanks
Vijay -
Basic extraction doubts sap SAP R/3 to SAP BI
IN SBIW which radio button i should select if i am extracting the Table in R/3 with 77 fields into sap BI ?
1) Transaction or
2)Master data attributes
3)texts data
please tell me ...
and after that If i want to use the table for reporting in SAP BI, To which is the best data target to create in SAP BI?
a)Infocube
b)DSO
and please tell me the steps to do in SAP BI system?
I am asking all these because i am new to sap BI ?
please do write me...thank you !!!!!!1Hi,
i suppose you need transaction data. We could be sure if you post the table which you want to extract.
The infoprovider you need is dependent from the data you need for reporting. Pls. search in SDN or in the help.sap.com for modelling help.
Regards
Edited by: Zoltan Both on Aug 20, 2008 1:14 PM
Edited by: Zoltan Both on Aug 20, 2008 1:16 PM -
EXTRACTing to TEXT file in Data Warehouse - Simple doubts!
Hi Experts,
Pls. clarify my simple doubts, in data EXTRACTing prog.,(data extract from SAP to text file in Application server, prog. runs in back ground)
For the Dataware house mapping, I hv been asked to make the following changes,
1) Presently, there is NO column headings in Text file, so I need to add the column Headings - How to get it done?
2) presently, its NOT tab deliminated, so, I need to make it to TAB deliminated- How to achieve it?
I am here paste some piece of code, so that U will get understand well.
PERFORM open_dataset_zdata_whouse_04.
DESCRIBE FIELD i_tab LENGTH tfr_length IN BYTE MODE.
LOOP AT i_itab.
TRANSFER i_itab TO transfer_file1 LENGTH tfr_length.
ENDLOOP.
CLOSE DATASET transfer_file1.
ThaNQ.See the below code :
parameters: d1 type localfile default
'/usr/sap/TST/SYS/Test.txt'.
data: begin of itab occurs 0,
field1(20) type c,
field2(20) type c,
field3(20) type c,
end of itab.
data: str type string.
constants: con_tab type x value '09'.
if you have a newer version, then you can use this
instead.
*constants:
con_tab type c value
cl_abap_char_utilities=>HORIZONTAL_TAB.
start-of-selection.
itab-field1 = 'ABC'.
itab-field2 = 'DEF'.
itab-field3 = 'GHI'.
append itab.
itab-field1 = '123'.
itab-field2 = '456'.
itab-field3 = '789'.
append itab.
open dataset d1 for output in text mode.
loop at itab.
translate itab using ' # '.
concatenate itab-field1 itab-field2 itab-field2
into str
separated by con_tab.
translate str using ' # '.
transfer str to d1.
endloop.
close dataset d1.
above code for tab delimited.
for heading then you can write simple logic in the loop of internal table
loop at itab.
if sy-tabix = 1'
move heading data to file.
endif.
endloop.
Thanks
Seshu -
A doubt in xml ..should i use extract or make my own plsql function..
I am using apex.. and fetchiNG data in xml format..
Now in plsql ..There are functions ..like extract which can be used to extract the values..
But i find it difficult to understand
since i find making a function which shall use substring and instr to find the value .. .
Wait let me show you the example of xml..data
<?xml version="1.0" encoding="WINDOWS-1252"?>
<CraftyResponse>
<address_data_paf_compact>
<thoroughfare_count>1</thoroughfare_count>
<thoroughfare>
<delivery_point_count>5</delivery_point_count>
<delivery_point>
<organisation_name>THE BAKERY</organisation_name>
<department_name/>
<po_box_number/>
<building_number>1</building_number>
<sub_building_name/>
<building_name/>
<udprn>12345678</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FILMS R US</organisation_name>
<department_name/>
<po_box_number/>
<building_number>3</building_number>
<sub_building_name/>
<building_name/>
<udprn>12345679</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FAMILY BUTCHER</organisation_name>
<department_name/>
<po_box_number/>
<building_number>7</building_number>
<sub_building_name/>
<building_name/>
<udprn>12345680</udprn>
</delivery_point>
<delivery_point>
<organisation_name/>
<department_name/>
<po_box_number/>
<building_number/>
<sub_building_name/>
<building_name>BIG HOUSE</building_name>
<udprn>12345681</udprn>
</delivery_point>
<delivery_point>
<organisation_name/>
<department_name/>
<po_box_number/>
<building_number>17</building_number>
<sub_building_name/>
<building_name>LITTLE COTTAGE</building_name>
<udprn>12345682</udprn>
</delivery_point>
<dependent_thoroughfare_name/>
<dependent_thoroughfare_descriptor/>
<thoroughfare_name>HIGH</thoroughfare_name>
<thoroughfare_descriptor>STREET</thoroughfare_descriptor>
</thoroughfare>
<double_dependent_locality/>
<dependent_locality>CRAFTY VALLEY</dependent_locality>
<town>BIG CITY</town>
<postal_county>POSTAL COUNTY</postal_county>
<traditional_county>TRADITIONAL COUNTY</traditional_county>
<postcode>AA1 1AA</postcode>
</address_data_paf_compact>
</CraftyResponse>
Now how do i extract values of town, postal_country building_name,
I know we can use extract to get the result ..But how exactly to use extract here I dotn know..
The other method is a easier method.. which involves creating your own function which uses substr ..and instr
It shal lsearch for <organisation_name> and find the orgonizatio..
I dont know which approch is betTER .. I find making my own customised function a easier and better way..
But any one has idea on extract function ..please let me know..
Db version is 11g
Any information shall be appreciated
ThanksHi Thanks Marco, and odie
Tried it.. some synatx issues..
Was trying to understand about these functions..
This is the structure of my table ..
desc xml_data_tab
Name Null Type
XML_DATA XMLTYPE()
This is the xml data
<?xml version = '1.0' encoding = 'UTF-8'?><CraftyResponse>
<address_data_paf_compact>
<thoroughfare_count>1</thoroughfare_count>
<thoroughfare>
<delivery_point_count>5</delivery_point_count>
<delivery_point>
<organisation_name>THE BAKERY</organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>1</building_number>
<sub_building_name></sub_building_name>
<building_name></building_name>
<udprn>12345678</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FILMS R US</organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>3</building_number>
<sub_building_name></sub_building_name>
<building_name></building_name>
<udprn>12345679</udprn>
</delivery_point>
<delivery_point>
<organisation_name>FAMILY BUTCHER</organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>7</building_number>
<sub_building_name></sub_building_name>
<building_name></building_name>
<udprn>12345680</udprn>
</delivery_point>
<delivery_point>
<organisation_name></organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number></building_number>
<sub_building_name></sub_building_name>
<building_name>BIG HOUSE</building_name>
<udprn>12345681</udprn>
</delivery_point>
<delivery_point>
<organisation_name></organisation_name>
<department_name></department_name>
<po_box_number></po_box_number>
<building_number>17</building_number>
<sub_building_name></sub_building_name>
<building_name>LITTLE COTTAGE</building_name>
<udprn>12345682</udprn>
</delivery_point>
<dependent_thoroughfare_name></dependent_thoroughfare_name>
<dependent_thoroughfare_descriptor></dependent_thoroughfare_descriptor>
<thoroughfare_name>HIGH</thoroughfare_name>
<thoroughfare_descriptor>STREET</thoroughfare_descriptor>
</thoroughfare>
<double_dependent_locality></double_dependent_locality>
<dependent_locality>CRAFTY VALLEY</dependent_locality>
<town>BIG CITY</town>
<postal_county>POSTAL COUNTY</postal_county>
<traditional_county>TRADITIONAL COUNTY</traditional_county>
<postcode>AA1 1AA</postcode>
</address_data_paf_compact>
</CraftyResponse>
Edited by: susf on Aug 29, 2012 7:00 PM -
Change to Extract Structure Doubt
Hi,
Our Basis Folks are trying to install Patch 6 ST-PI 2005_1_700 in ECC. I refered to OSS Note 328181.
For this Patch do we need to delete the Set up Table and Fill it again? And How about Init Delta in BW?
Please suggest me. Any answers will be appreciated with Points.
Kind Regards
Mahesh.NHello,
Yes you have to delete the Setup table data before that as per the OSS Note you have to clear the delta queue data which cannot be recovered after changing the extract structure. So execute the BW Delta Infopackages and make sure there is no delta records in RSA7 or LBWQ.
Then you can delete the setup table using LBWG and implement the patch.
1. Make sure that the following steps are carried out at a time when no updates are performed so that no data is lost.
2. Start the update collective run directly from within the Customizing Cockpit. Up to PI(-A) 2001.2 , this collective run exclusively concerns the V3 update. As of PI(-A) 2002.1, depending on the update mode setting of the application, the collective run concerns either the V3 update or the update from the extraction queue ("Delta Queued", see Note 505700).
3. Load all data of the respective DataSource into the BW System.
Now you can make the change.
After a change you can no longer use the statistical data already recreated. If such data still exists, you should delete it (Transaction LBWG).
We recommend in particular to upload the data immediately after a restructuring and (after checking in BW) delete them from the restructuring tables.
Moreover, the update log (Transaction LBWF) can no longer be read. Post a document in this case so that the last log entry is overwritten. This log entry then has the correct new format of the extract structure.
As of PI 2000.2 the program RMCEXDELETELOG is available. It can be used to delete log entries.
But if there is any change in lenght of any field of the extract structure, then you have to reload the entire data again in BW otherwise a Init without data transfer will do.
But what is the patch all about? Please follow the instruction given in the OSS Note 328181 - Changes to extract structures in Customizing Cockpit.
Thanks
Chandran -
CRM Extraction and Enhancement Doubts.
Hi BW Experts,
I am trying to understand few things for the CRM Enchancement and BWA1 transaction.We have gone through many threads, but i couldnt able to get answer for my questions.
1. Currently i am using the datasource "0CRM_SRV_CONFIRM_I" and "0CRM_SRV_PROCESS_I" for extracting the data. I need to enchance 2 fields from this datasource.
I have following questions regarding this activities.
1.Where can i add the enchanced field (RSA6-> Append Structure and writing Code in CMOD) or can i add the enchanced field in BWA1 (BW Adapter, In Mapping Tab).
2.What is the difference between in writing the code in CMOD (Function Exit) and writing code using BADI (CRM_BWA_MFLOW) for extraction.
3.I have written the enchanced code in BADI (CRM_BWA_MFLOW). But while executing in TCODE:RSA3, the control is not going to BADI (CRM_BWA_MFLOW).I have found another BADI (RSU5_SAPI_BADI) and written the enchanced code in this, but while executing, the control stops and getting the data in RSA3.I just want to know, what is the purpose of BADI (CRM_BWA_MFLOW).
4. In CRM, How can we intialise the delta for the particular datasource.Can we able to intialise delta for all datasources which are available in Tcode: BWA5
5. Please Explain how data, flows from CRM to BW.As to my understanding i have given these points.Please verify.
a)Activate the datasource (0CRM_SRV_PROCESS_I - Service Order Item datasource)from RSA5 and can be available in RSA6.
b)Added 2 enchanced fields in RSA6 -> Append Structure.
c)Written Code in BADI CRM_BWA_MFLOW and activated.
d)Then in TCODE: BWA1,I clicked Change Button, and tried to view the mapping Tab.
E) Will the Enchanced field be available in Mapping Tab ? If not what should i do.
F) I used the Tocde : BWA5 and select the datasource, and clicked the button "Select delta".If i didnt do this step, the delta is not enabled for this datasource ?
G) After this what are the steps i need to perform from CRM Side.
Please help on my queries.
Thanks in advance.
Thanks,
Jelina.Hi Satya,
Thanks for the quick reply.
I have some questions based on ur answers.
a)Activate the datasource (0CRM_SRV_PROCESS_I - Service Order Item datasource)from RSA5 and can be available in RSA6.
b)Added 2 enchanced fields in RSA6 -> Append Structure.
c)Written Code in CMOD and activated.
d)Then in TCODE: BWA1,I clicked Change Button, and tried to view the mapping Tab.(no need to go bwa1 if u r using CRM 5.x)
My Queries :
Currently we are using CRM 7.0.In this case do we need to add the enchanced fields.Can you please tell me what is meant by Segment Name and Segment Field in BWA1 (Mapping Tab).
-> I have written the enchanced code in BADI (CRM_BWA_MFLOW). But while executing in TCODE:RSA3, the control is not going to BADI (CRM_BWA_MFLOW).I have found another BADI (RSU5_SAPI_BADI) and written the enchanced code in this, but while executing, the control stops and getting the data in RSA3.I just want to know, what is the purpose of BADI (CRM_BWA_MFLOW).
-> In CRM, How can we intialise the delta for the particular datasource.Can we able to intialise delta for all datasources which are available in Tcode: BWA5
-> Please Explain how data, flows from CRM to BW.
In CRM 7, Regarding delta for this datasource, Do i need to activate it in BWA5.
Thanks,
Jelina -
Doubts abt extraction of Invoice doc
Hi experts,
We can get the purchasing related information from Purchasing datasources. Material Movements from Inventory datasources.
But i am unable to find the invoice related fields of MM in any datasources.
Please explain me how normally all will extract invoice documents from R/3 to BI ie in which datasources the invoice doc no and related information we can get.
Regards,
V N.Anyone please help me in this regard....
-
Hi,
I have some doubts on CO-PA..
1)From where does the operating concern get data?(Functional Information)
2)What is Field name for Partioning?
3)What r these tables-CE1,CE2,CE3,CE4 in CO-PA?When they r formed and What data do they store?
4)What is Safety Delta and Why?
Inputs r welcome...and appreciatedHi,
4)What is Safety Delta and Why?
SAP NOTE : 392876
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20co-pa%20extraction%203.0x
Regards
Happy Tony -
Extraction and loading of Training and Event Management data (0HR_PE_1)
hello,
I've got the following doubt:
before BI 7.0 release, extractor 0HR_PE_1 extracts event data (eventid, attendee id, calday,...) but if you load straight to cube 0PE_C01, as Calendar year/month needs a reference date (for example, event start date), you'll get total duration of event in hours or days refered to event star date.
So in a query filtered by month, you get total duration of an event that starts in the filtered month but it couldn`t end until few months later o year later, so you don´t get appropiate information.
Example:
Event calday Hours
10004377 20081120 500 but from event_attr event end date is 20090410.
In a query filtered by 200811 you get total duration time (500 hours when in 200811 event hours have been 20) or if you filter by any month of 2009 you don´t get information of duration of that event.
I had to create a copy of standar cube (without calday, only Calendar year/month, Calendar year in time dimension) and disaggrate data creating as many entries for an event as months lasts and adjust calculation of ratios duration of event (duration of event in each month/ total duration of event).
The question is: Is there any improvement or change on business content in BI 7.0 to treat Training and Event Management data? Has anybody had to deal with that?
Thank you very much.
IRBHi,
TEM data is stored in HRP tables.
You can load the catalog by creating LSMWs for objects Business event group (L), Business event types (D), Locations (F), Organizers (U) as per requirement.
LSMW for tcode PP01 can be used to create these objects.
To create Business Events (E) you can create LSMW for PV10/PV11.
To book attendee create LSMW for tcode PV08 as here you can specify the actual business event ID which reduces ambiguity.
tcode PV12 to firmly book events
tcode PV15 to follow up
Hope this helps.
Regards,
Shreyasi. -
Extracting more number of records than present number in Infoprovider
Hi Frnds,
i have one doubt about data extraction.
here in my scenario i have one DSO & Infocube in modeling .
Source DSO for Data extraction :
DSO is having 10 fields in design .
2 are Key fields
8 are Data fields
& we have enabled some navigation attributes of those key fields in DSO.
target Infocube for data loading :
4 keyfigure & rest all are characteristics designed in Dimension properly
DSO --> Cube loading :
Source DSO is having 10 records when i triggered loading it is extracting more that 10 records .
when i check the records in Debugging it is showing more that 10 records because of DSO keyfields & navigation attribute combination .
it is forming more number records than original 10 records.
i don't know whether is it right or wrong ?
example here i am giving:
if we assume source DSO is having only one record but it is extracting 4 records with the same key.
0MATERIAL 0PLANT KEYFIGURE1 KEYFIGURE2
100 4000 10 20
In extraction it is showing as below
0MATERIAL 0PLANT 0MATERIAL_NAVIGATIONATTRIBUE KEYFIGURE1 KEYFIGURE2
100 4000 XXXX 10 20
100 4000 YYYY 10 20
100 4000 ZZZZ 10 20
100 4000 ZYZY 10 20
my question is why it is extracing 4 records ? ( why it is taking navigation attribute values in extraction .
BR
RavinderHello,
Check OSS Note 1145673
Steps to be performed:
1. Apply the OSS note in the dev system
2. OSS note might de-activate the transformation and DTP.
3. Note down the transformation and DTP which gets de-activated because of this OSS note.
4. Also send out a mail to BW community saying you are gonna apply this OSS note and ask them to check thier objects whether it is getting impacted by this oss note or not.
5. Ask everyone to check the data load and the data is getting populated or not.
6. Apply OSS note in QA and production. Also before applying the OSS in QA and production collect the objects which are getting impacted by this note in dev.
7. After applying the oss note in QA, send the collected Transforamtions and DTPs to the QA and do a test in QA as well.
8. Finally apply the oss note in production and transport the impacted transformations and DTP in production.
Regards,
Shashank -
Hi every one i have a small doubt in FI report that is i have to give the following output as per the user requirement i had added all the everything in this program i had given u the entire code the only problem is if make comment for the code of city and postal code the remaining everything is working properly and if i remove comment at CITY and POSTAL CODE there is some error can u find out that and help me please
* Ist-Einzelpostenanzeige EC-PCA *
* - direkte Aufruf *
* - Report Writer *
* - Recherche *
* 45b MIC: default values for poper and ryear depfr. fiscyear variant *
* 46a MIC Warning if too few selection parameters *
* 46a MIC: use up to 'whr_size' single values in select statement *
* 46a MIC: move'Initialization of Rep-Rep-Interface' to Initialization*
* 46a MIC: check only new auth-object *
* 46c MIC: add RMVCT and get more fields from RRI *
REPORT z_rcopca02_1 NO STANDARD PAGE HEADING MESSAGE-ID km
LINE-COUNT (2) LINE-SIZE 81.
* Typen ***************************************************************
*type-pools: kkblo.
TYPE-POOLS: slis, ecarc.
* DDIC-Tabellen *******************************************************
TABLES: glpca, "Einzelposten / Ist
glu1, "Übergabestruktur FI-SL-Anzeige
t000,
tka01,
sscrfields,
lfa1,
kna1,
bseg,
with_item.
* Variablen und int. Tabellen *****************************************
DATA: afield TYPE slis_fieldcat_alv,
sp_group TYPE slis_sp_group_alv,
t_listheader TYPE slis_t_listheader WITH HEADER LINE,
t_layout TYPE slis_layout_alv,
t_fieldcat TYPE slis_t_fieldcat_alv,
t_spec_groups TYPE slis_t_sp_group_alv,
event TYPE slis_alv_event,
t_events TYPE slis_t_event,
g_variant LIKE disvariant,
gx_variant LIKE disvariant,
g_exit(1) TYPE c,
g_save(1) TYPE c,
g_repid LIKE sy-repid,
msgtyp LIKE sy-msgty,
lt_dynpread LIKE dynpread OCCURS 1 WITH HEADER LINE,
ls_rpcak LIKE rpcak, "note 0310592
packsize TYPE i VALUE 1000,
text1(60) TYPE c,
text2(60) TYPE c,
oldkokrs LIKE glpca-kokrs,
oldracct LIKE glpca-racct.
DATA: whr_size TYPE i VALUE 50,"Maximum of single values per MIC 46a
"charact. in the where-clause of the select-statement
lines TYPE i, "number of lines of range table MIC 46a
cnt_rldnr TYPE i, "Zähler Anzahl selektierter Ledger
cnt_kokrs TYPE i, "Zähler Anzahl selektierter KoReKreise
cnt_poper TYPE i, "Zähler Anzahl selektierter Perioden
cnt_ryear TYPE i, "Zähler Anzahl selektierter GeschJahre
cnt_rvers TYPE i, "Zähler Anzahl selektierter Versionen
cnt_bukrs TYPE i, "Zähler Anzahl selektierter BuKreise
empge LIKE dkobr-empge,
ksl_curr LIKE tka01-pcacur,
hsl_curr LIKE t001-waers,
a_rec LIKE rstirec.
DATA: BEGIN OF dim_data.
INCLUDE STRUCTURE rgcdi. "data for dimensions
DATA: END OF dim_data.
DATA: BEGIN OF tab_fields OCCURS 80,
name LIKE dntab-fieldname, "fields in table i_glpca
END OF tab_fields.
DATA: BEGIN OF i_glpca OCCURS 0.
INCLUDE STRUCTURE rpca2.
DATA: racct_ktext LIKE rpcak-ktext,
psppp LIKE prps-posid,
name1 LIKE lfa1-name1,
adrnr like lfa1-adrnr,
stras like lfa1-stras,
c_name1 like kna1-name1,
v_rate like with_item-qsatz,
qsshb like bseg-qsshb,
qbshb like bseg-qbshb,
END OF i_glpca.
DATA: rw_subrc LIKE sy-subrc, "Flag: Report-Writer-Schnittstelle
re_subrc LIKE sy-subrc, "Flag: Recherche-Schnittstelle
subrc LIKE sy-subrc.
DATA: set_id LIKE sethier-setid, "Set-ID "RDI_SETS_4.0
set_class LIKE sethier-setclass, "Setklasse "RDI_SETS_4.0
set_sname LIKE sethier-shortname."Setname (24) "RDI_SETS_4.0
DATA: authorised(1),
s_message(1),
auth_dbcount LIKE sy-tabix,
* Hex-Konstanten für Minimum/Maximum-Werte
BEGIN OF hex00,
x1(12) TYPE c,
x2(12) TYPE c,
END OF hex00,
BEGIN OF hexff,
x1(12) TYPE c,
x2(12) TYPE c,
END OF hexff.
RANGES rclnt FOR glpca-rclnt.
FIELD-SYMBOLS: <glpca> LIKE LINE OF i_glpca,
<glpca_arc> TYPE ecarc_glpca_curr.
* Selektionsoptionen *************************************************
SELECT-OPTIONS:
rldnr FOR glpca-rldnr DEFAULT '8A' NO-DISPLAY,
rassc FOR glpca-rassc NO-DISPLAY,
* rrcty for glpca-rrcty default 0,
rrcty FOR glpca-rrcty,
rvers FOR glpca-rvers DEFAULT '000',
kokrs FOR glpca-kokrs MEMORY ID cac,
bukrs FOR glpca-rbukrs MEMORY ID buk,
* poper for glpca-poper default sy-datlo+4(2),
* ryear for glpca-ryear default sy-datlo,
poper FOR glpca-poper,
ryear FOR glpca-ryear,
prctr FOR glpca-rprctr MATCHCODE OBJECT prct,
pprctr FOR glpca-sprctr MATCHCODE OBJECT prct,
* RACCT FOR GLPCA-RACCT MATCHCODE OBJECT KART, "RD_P30K128304
racct FOR glpca-racct, "RD_P30K128304
drcrk FOR glpca-drcrk,
activ FOR glpca-activ,
rhoart FOR glpca-rhoart,
rfarea FOR glpca-rfarea,
stagr FOR glpca-stagr,
rtcur FOR glpca-rtcur,
runit FOR glpca-runit,
versa FOR glpca-versa NO-DISPLAY,
eprctr FOR glpca-eprctr NO-DISPLAY,
afabe FOR glpca-afabe NO-DISPLAY,
rmvct FOR glpca-rmvct NO-DISPLAY,
hrkft FOR glpca-hrkft NO-DISPLAY, "note 550972
sbukrs FOR glpca-sbukrs NO-DISPLAY, "note 550972
shoart FOR glpca-shoart NO-DISPLAY, "note 550972
sfarea FOR glpca-sfarea NO-DISPLAY, "note 550972
docct FOR glpca-docct,
docnr FOR glpca-docnr,
refdocct FOR glpca-refdocct,
refdocnr FOR glpca-refdocnr,
werks FOR glpca-werks,
repmatnr FOR glpca-rep_matnr MATCHCODE OBJECT pca_shlp_rep_matnr,
rscope FOR glpca-rscope.
PARAMETERS: no_rrint NO-DISPLAY DEFAULT ' '." skip "MICP40K066037
" report-report-interface
* display variant ">>MICP40K039857
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE text-e01.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN COMMENT 47(40) varname FOR FIELD p_vari.
SELECTION-SCREEN END OF BLOCK 0.
PARAMETERS log_grp(4) TYPE c NO-DISPLAY DEFAULT 'zKE5Z'.
"<<MICP40K039857
RANGES: v_racct FOR glpca-racct,
v_prctr FOR glpca-rprctr,
v_pprctr FOR glpca-sprctr.
* Tabelle mit Werten aus den Berichts-Set vom Report-Writer *
DATA BEGIN OF val_tab OCCURS 50.
INCLUDE STRUCTURE rgciv.
DATA END OF val_tab.
*************************************************** MICP30K166368
* feldkatalog und interface für bb-schnittstelle rw MICP30K166368
*************************************************** MICP30K166368
"MICP30K166368
DATA BEGIN OF bbs_fieldtab OCCURS 20. "MICP30K166368
INCLUDE STRUCTURE rstifields. "MICP30K166368
DATA END OF bbs_fieldtab. "MICP30K166368
* archiv
TYPE-POOLS: rsds.
TYPES: BEGIN OF ty_archive_objects,
object LIKE arch_obj-object,
END OF ty_archive_objects,
ty_t_archive_objects TYPE ty_archive_objects OCCURS 2.
CONSTANTS: lc_set TYPE c VALUE 'X',
lc_report TYPE progname VALUE 'ZKE5Z',
lc_reporttype TYPE reporttype VALUE 'TR'.
TABLES: admi_files.
SELECT-OPTIONS lr_files FOR admi_files-archiv_key NO-DISPLAY.
PARAMETER: read_db TYPE c DEFAULT 'X' NO-DISPLAY,
read_ar TYPE c NO-DISPLAY,
arc_obj LIKE arch_obj-object NO-DISPLAY,
read_as TYPE c DEFAULT 'X' NO-DISPLAY.
DATA : lt_arch_obj TYPE ty_t_archive_objects WITH HEADER LINE,
ls_selections TYPE rsds_frange,
lt_selections TYPE rsds_frange_t,
ls_selopt TYPE rsdsselopt,
lt_glpca_archiv TYPE ecarc_t_glpca_curr.
*********************************************************>>MICP40K039857
* INITIALIZATION
INITIALIZATION.
* Diverse Initialisierungen
PERFORM init_vars.
g_repid = sy-repid.
* Set default values for record type
rrcty-sign = 'I'.
rrcty-option = 'EQ'.
rrcty-low = '0'.
APPEND rrcty.
rrcty-low = '2'.
APPEND rrcty.
* Set default values for period and year (if kokrs or bukrs is known)
GET PARAMETER ID 'BUK' FIELD bukrs-low.
GET PARAMETER ID 'CAC' FIELD kokrs-low.
IF kokrs-low IS INITIAL "get contr. area from company code
AND NOT bukrs-low IS INITIAL.
CALL FUNCTION 'KOKRS_GET_FROM_BUKRS'
EXPORTING
i_bukrs = bukrs-low
IMPORTING
e_kokrs = kokrs-low
EXCEPTIONS
no_kokrs_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
CLEAR kokrs-low.
ENDIF.
ENDIF.
IF NOT kokrs-low IS INITIAL.
CALL FUNCTION 'K_KOKRS_READ' "get fiscal year variant
EXPORTING
kokrs = kokrs-low
IMPORTING
e_tka01 = tka01
EXCEPTIONS
not_found = 1
not_found_gjahr = 2
OTHERS = 3.
IF sy-subrc = 0.
CALL FUNCTION 'G_PERIOD_GET'
EXPORTING
date = sy-datlo
variant = tka01-lmona
IMPORTING
period = poper-low
year = ryear-low
EXCEPTIONS
ledger_not_assigned_to_company = 1
period_not_defined = 2
variant_not_defined = 3
OTHERS = 4.
IF sy-subrc = 0.
poper-sign = 'I'.
poper-option = 'EQ'.
APPEND poper.
ryear-sign = 'I'.
ryear-option = 'EQ'.
APPEND ryear.
ENDIF.
ENDIF.
ENDIF.
* Settings for display variants
g_save = 'A'. "Schalter Varianten benutz./allg. speichern
CLEAR g_variant.
g_variant-report = g_repid.
g_variant-log_group = log_grp.
g_variant-username = sy-uname.
* Get default variant
gx_variant = g_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_vari = gx_variant-variant.
ENDIF.
* Set variant
IF p_vari IS INITIAL.
p_vari = '1SAP'.
MOVE p_vari TO gx_variant-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gx_variant
EXCEPTIONS
not_found = 1.
IF sy-subrc NE 0.
CLEAR p_vari.
CLEAR gx_variant-variant.
ENDIF.
ENDIF.
varname = gx_variant-text.
"<<MICP40K039857
* archiv
CALL FUNCTION 'KARL_DATA_INPUT_INIT'
EXPORTING
i_report = lc_report
i_reporttype = lc_reporttype
IMPORTING
e_xusedb = read_db
e_xusear = read_ar
e_archobj = arc_obj
e_infosys = read_as
TABLES
t_arch_sel = lr_files.
DATA: lt_excluding LIKE sy-ucomm OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = 'SELSCREEN'
p_program = 'RCOPCA02'
TABLES
p_exclude = lt_excluding.
* Initialisieren der Bericht/Bericht-Schnittstellen *
DATA: ld_no_rrint TYPE boole_d. "note 490484 begin
IMPORT rri = ld_no_rrint FROM MEMORY ID 'RCOPCA02_NO_RRI'.
IF ld_no_rrint = 'X'.
FREE MEMORY ID 'RCOPCA02_NO_RRI'.
ELSE. "note 490484 end
CALL FUNCTION 'G_REPORT_INTERFACE_INIT' "Report-Writer?
EXPORTING "MICP30K166368
table = 'GLPCT' "MICP30K166368
IMPORTING
subrc = rw_subrc "MICP30K166368
TABLES "MICP30K166368
it_fieldr = bbs_fieldtab. "MICP30K166368
CALL FUNCTION 'RSTI_APPL_STACK_POP'"oder Recherche?
IMPORTING
i_rec = a_rec
EXCEPTIONS
appl_stack_not_initialized = 1.
re_subrc = sy-subrc.
IF re_subrc = 0.
* check Receiver is this report
IF NOT ( ( a_rec-rtool = 'RT' AND a_rec-ronam = 'Z_RCOPCA02_1' )
OR ( a_rec-rtool = 'TR' AND a_rec-ronam = 'ZKE5Z' ) ) .
re_subrc = 2.
ENDIF.
ENDIF.
ENDIF.
* AT SELCTION-SCREEN on value request**********************************
*at selection-screen on value-request for racct-low. "RD "4.6a
* "RD "4.6a
* call function 'K_RACCT_VALUE_REQUEST' "RD "4.6a
* importing "RD "4.6a
* e_racct = racct-low. "RD "4.6a
* "RD "4.6a
* "RD "4.6a
*at selection-screen on value-request for racct-high. "RD "4.6a
* "RD "4.6a
* call function 'K_RACCT_VALUE_REQUEST' "RD "4.6a
* importing "RD "4.6a
* e_racct = racct-high. "RD "4.6a
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari. "MICP40K039857
PERFORM f4_for_variant. "MICP40K039857
AT SELECTION-SCREEN ON VALUE-REQUEST FOR poper-low. "RD "4.6a
* begin of insertion note 522715
CALL FUNCTION 'K_KOKRS_READ'
EXPORTING
kokrs = kokrs-low
EXCEPTIONS
not_found = 1
not_found_gjahr = 2
OTHERS = 3.
IF sy-subrc = 0.
* end of insertion note 522715
CALL FUNCTION 'ECPCA_RPMAX_VALUE_REQUEST' "RD "4.6a
EXPORTING "RD "4.6a
i_kokrs = kokrs-low "RD "4.6a
i_ryear = ryear-low "RD "4.6a
IMPORTING "RD "4.6a
e_rpmax = poper-low "RD "4.6a
* begin of insertion note 522715
EXCEPTIONS
table_empty = 1.
ENDIF.
* end of insertion note 522715
AT SELECTION-SCREEN ON VALUE-REQUEST FOR poper-high. "RD "4.6a
* begin of insertion note 522715
CALL FUNCTION 'K_KOKRS_READ'
EXPORTING
kokrs = kokrs-low
EXCEPTIONS
not_found = 1
not_found_gjahr = 2
OTHERS = 3.
IF sy-subrc = 0.
* end of insertion note 522715
CALL FUNCTION 'ECPCA_RPMAX_VALUE_REQUEST' "RD "4.6a
EXPORTING "RD "4.6a
i_kokrs = kokrs-low "RD "4.6a
i_ryear = ryear-low "RD "4.6a
IMPORTING "RD "4.6a
e_rpmax = poper-high "RD "4.6a
* begin of insertion note 522715
EXCEPTIONS
table_empty = 1.
ENDIF.
* end of insertion note 522715
* AT SELCTION-SCREEN ***************************************************
AT SELECTION-SCREEN.
PERFORM pai_of_selection_screen.
* begin of insertion note 522715
IF NOT kokrs-low IS INITIAL.
CALL FUNCTION 'K_KOKRS_READ'
EXPORTING
kokrs = kokrs-low
EXCEPTIONS
not_found = 1
not_found_gjahr = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e101(ki) WITH kokrs-low.
ENDIF.
ENDIF.
* end of insertion note 522715
* archiv
IF sy-ucomm = 'FC01' OR sy-ucomm = 'UCDS'
OR sy-ucomm = 'ONLI' AND read_ar = 'X'
AND read_as IS INITIAL AND lr_files[] IS INITIAL.
IF lt_arch_obj[] IS INITIAL.
lt_arch_obj-object = 'PCA_OBJECT'. APPEND lt_arch_obj.
lt_arch_obj-object = 'EC_PCA_ITM'. APPEND lt_arch_obj.
ENDIF.
CALL FUNCTION 'KARL_DATA_INPUT_SELECT'
EXPORTING
i_db_and_arc = lc_set
i_infosys_possible = lc_set
i_object_fixed = 'V'
i_documentation = 'KARL_DATA_INPUT_SEL_KE5YZ'
i_report = lc_report
i_reporttype = lc_reporttype
TABLES
t_objects = lt_arch_obj
t_arch_sel = lr_files
CHANGING
c_xusedb = read_db
c_xusear = read_ar
c_archobj = arc_obj
c_infosys = read_as.
ENDIF.
* START-OF-SELECTION **************************************************
START-OF-SELECTION.
* Default-Werte löschen, falls Aufruf über Recherche
* oder Report-Writer erfolgt ist
IF no_rrint IS INITIAL AND ld_no_rrint IS INITIAL. "note 490484
IF rw_subrc EQ 0 OR re_subrc EQ 0.
REFRESH: rldnr, rrcty, rvers, kokrs, bukrs, poper, ryear,
racct, prctr, pprctr, drcrk, activ, rhoart, rfarea,
versa, afabe, eprctr,
v_racct, v_prctr, v_pprctr.
CLEAR: rldnr, rrcty, rvers, kokrs, bukrs, poper, ryear,
racct, prctr, pprctr, drcrk, activ, rhoart, rfarea,
versa, afabe, eprctr,
v_racct, v_prctr, v_pprctr.
IF NOT read_as IS INITIAL. "note 625581
CLEAR: lr_files, lr_files[]. "note 625581
ENDIF. "note 625581
ENDIF.
* Parameter einlesen über Report-Writer-Schnittstelle *
IF rw_subrc EQ 0.
PERFORM rw_get_parameters.
* oder Parameter einlesen über Recherche-Schnittstelle *
ELSEIF re_subrc EQ 0.
PERFORM re_get_parameters.
ENDIF.
ENDIF.
IF read_db = 'X'. " read from DB (archiv)
* Bewegungsdaten einlesen und puffern...................................
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Einzelposten selektieren'(p10).
* Use dirty trick to mislead DB-optimizer
CALL FUNCTION 'DB_DO_NOT_USE_CLIENT_INDEX'
EXPORTING
value = sy-mandt
TABLES
mandttab = rclnt.
SELECT (tab_fields) FROM glpca
CLIENT SPECIFIED
PACKAGE SIZE packsize
APPENDING CORRESPONDING FIELDS OF TABLE i_glpca
WHERE rldnr IN rldnr
AND rrcty IN rrcty
AND rvers IN rvers
AND kokrs IN kokrs
AND rbukrs IN bukrs
AND ryear IN ryear
AND rassc IN rassc
AND hrkft IN hrkft "note 550972
AND sbukrs IN sbukrs "note 550972
AND shoart IN shoart "note 550972
AND sfarea IN sfarea "note 550972
AND racct IN racct
AND rprctr IN prctr
AND sprctr IN pprctr
AND poper IN poper
AND drcrk IN drcrk
AND activ IN activ
AND rhoart IN rhoart
AND rfarea IN rfarea
AND versa IN versa
AND eprctr IN eprctr
AND afabe IN afabe
AND rmvct IN rmvct
AND docct IN docct
AND docnr IN docnr
AND stagr IN stagr
AND rtcur IN rtcur
AND runit IN runit
AND refdocct IN refdocct
AND refdocnr IN refdocnr
AND werks IN werks
AND rep_matnr IN repmatnr "RDIP40K020663
AND rscope IN rscope "RDIP40K020663
AND rclnt IN rclnt. "dirty trick to mislead DB-optimizer
IF sy-dbcnt > 1.
text1 = sy-dbcnt.
CONDENSE text1.
CONCATENATE text1 text-m01 INTO text2 SEPARATED BY space.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = text2. " ... Datensätze gelesen
ENDIF.
ENDSELECT.
* Entfernt nicht zugehörige Einträge....................................
LOOP AT i_glpca WHERE ( NOT rprctr IN v_prctr )
or ( not SPRCTR in v_pprctr )
OR ( NOT racct IN v_racct ).
DELETE i_glpca.
ENDLOOP.
ENDIF.
*archiv
IF read_ar = 'X' AND NOT
( read_as IS INITIAL AND lr_files[] IS INITIAL ).
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Lesen im Archiv'(p12).
DEFINE fill_lt_selections.
if not &2[] is initial.
clear ls_selections.
move &1 to ls_selections-fieldname.
loop at &2.
clear ls_selopt.
move-corresponding &2 to ls_selopt.
append ls_selopt to ls_selections-selopt_t.
endloop.
append ls_selections to lt_selections.
endif.
END-OF-DEFINITION.
fill_lt_selections 'RLDNR' rldnr.
fill_lt_selections 'RRCTY' rrcty.
fill_lt_selections 'RVERS' rvers.
fill_lt_selections 'KOKRS' kokrs.
fill_lt_selections 'RBUKRS' bukrs.
fill_lt_selections 'POPER' poper.
fill_lt_selections 'RYEAR' ryear.
fill_lt_selections 'RPRCTR' prctr.
fill_lt_selections 'SPRCTR' pprctr.
fill_lt_selections 'RACCT' racct.
fill_lt_selections 'DRCRK' drcrk.
fill_lt_selections 'ACTIV' activ.
fill_lt_selections 'RHOART' rhoart.
fill_lt_selections 'RFAREA' rfarea. "note 401961
fill_lt_selections 'STAGR' stagr.
fill_lt_selections 'RTCUR' rtcur.
fill_lt_selections 'RUNIT' runit.
fill_lt_selections 'VERSA' versa.
fill_lt_selections 'EPRCTR' eprctr.
fill_lt_selections 'AFABE' afabe.
fill_lt_selections 'RMVCT' rmvct.
fill_lt_selections 'DOCCT' docct.
fill_lt_selections 'DOCNR' docnr.
fill_lt_selections 'REFDOCCT' refdocct.
fill_lt_selections 'REFDOCNR' refdocnr.
fill_lt_selections 'WERKS' werks.
fill_lt_selections 'REP_MATNR' repmatnr.
fill_lt_selections 'RSCOPE' rscope.
fill_lt_selections 'HRKFT' hrkft. "note 550972
fill_lt_selections 'SBUKRS' sbukrs. "note 550972
fill_lt_selections 'SHOART' shoart. "note 550972
fill_lt_selections 'SFAREA' sfarea. "note 550972
CALL FUNCTION 'EC_PCA_SELECT_FROM_ARCHIVE'
EXPORTING
i_selections = lt_selections[]
i_files_sequential_read = lr_files[]
IMPORTING
e_glpca = lt_glpca_archiv[]
EXCEPTIONS
no_infostruc_found = 1.
IF sy-subrc = 1.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR i_glpca.
LOOP AT lt_glpca_archiv ASSIGNING <glpca_arc>
WHERE ( rprctr IN v_prctr )
and ( sprctr IN v_pprctr )
AND ( racct IN v_racct ).
MOVE-CORRESPONDING <glpca_arc> TO i_glpca.
APPEND i_glpca.
ENDLOOP.
* delete duplicate records note 639647
IF NOT read_db IS INITIAL AND NOT lt_glpca_archiv[] IS INITIAL.
SORT i_glpca.
DELETE ADJACENT DUPLICATES FROM i_glpca.
ENDIF.
ENDIF.
IF i_glpca[] IS INITIAL. "Info,nichts gefunden
MESSAGE s000.
EXIT.
ENDIF.
* get texts for accounts ...............................................
SORT i_glpca BY kokrs racct.
LOOP AT i_glpca ASSIGNING <glpca>.
IF <glpca>-kokrs <> oldkokrs OR <glpca>-racct <> oldracct. "AT NEW
CLEAR ls_rpcak.
oldkokrs = <glpca>-kokrs.
oldracct = <glpca>-racct.
CALL FUNCTION 'K_RACCT_SINGLE_CHECK' "note 0310592
EXPORTING
i_kokrs = <glpca>-kokrs
i_racct = <glpca>-racct
i_spras = sy-langu
i_textflag = 'X'
IMPORTING
e_rpcak = ls_rpcak
EXCEPTIONS
not_valid = 1
OTHERS = 2.
IF sy-subrc NE 0.
CLEAR ls_rpcak.
ENDIF.
ENDIF. "ENDAT
<glpca>-racct_ktext = ls_rpcak-ktext.
* Fetching vendor name from vendor number
*break-point.
SELECT SINGLE * FROM LFA1
WHERE LIFNR = <glpca>-LIFNR AND
SPRAS = SY-LANGU.
IF SY-SUBRC eq 0.
<glpca>-name1 = lfa1-name1.
<glpca>-adrnr = lfa1-adrnr.
<glpca>-stras = lfa1-stras.
ENDIF.
* Fetching customer name from customer number
SELECT SINGLE * FROM kna1
WHERE KUNNR = <glpca>-KUNNR.
IF SY-SUBRC eq 0.
<glpca>-c_name1 = kna1-name1.
ENDIF.
SELECT SINGLE * FROM bseg
WHERE BUKRS EQ <glpca>-rbukrs AND
BELNR EQ <glpca>-refdocnr AND
GJAHR EQ <glpca>-ryear AND
KTOSL EQ 'WIT' AND
BUZEI EQ <glpca>-refdocln.
IF SY-SUBRC eq 0.
SELECT SINGLE * FROM WITH_ITEM
WHERE BUKRS EQ <glpca>-rbukrs AND
BELNR EQ <glpca>-refdocnr AND
GJAHR EQ <glpca>-ryear." AND
* BUZEI EQ <glpca>-refdocln AND
* WITHT EQ BSEG-QSSKZ.
IF SY-SUBRC eq 0.
<glpca>-v_rate = with_item-qsatz.
<glpca>-qsshb = with_item-WT_QSSHB.
<glpca>-qbshb = with_item-WT_QBSHB.
ENDIF.
ENDIF
ENDLOOP.
* Liste mit Einzelposten geeignet sortieren.............................
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Einzelposten sortieren'(p30).
* if show_ref is initial.
* sort i_glpca by rldnr ryear rbukrs rrcty rvers
* docct docnr docln.
* else.
SORT i_glpca BY rldnr kokrs ryear rbukrs rrcty rvers poper
refdocct refdocnr refdocln.
* endif.
* Berechtigungsprüfung und gemerkte Belege aufbereiten .................
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Berechtigungsprüfungen'(p40).
CLEAR: cnt_rldnr, cnt_kokrs, cnt_ryear, cnt_rvers, cnt_bukrs.
LOOP AT i_glpca ASSIGNING <glpca>.
* Berechtigungscheck
PERFORM check_repo_authority CHANGING authorised.
IF authorised IS INITIAL.
DELETE i_glpca.
s_message = 'X'.
* zählen der Sätze ohne Berechtigung
auth_dbcount = auth_dbcount + 1.
ELSE. "Weitere Bearbeitung nur für berechtigte Belege...
* Zusätzlich merken der Anzahl der Ausprägungen
* bestimmter Dimensionen
ON CHANGE OF <glpca>-rldnr.
ADD 1 TO cnt_rldnr.
ENDON.
ON CHANGE OF <glpca>-kokrs.
ADD 1 TO cnt_kokrs.
CALL FUNCTION 'G_CURRENCY_FROM_CT_GET'
EXPORTING
ct = '90'
kokrs = <glpca>-kokrs
rldnr = <glpca>-rldnr
IMPORTING
currency = ksl_curr.
ENDON.
ON CHANGE OF <glpca>-poper.
ADD 1 TO cnt_poper.
ENDON.
ON CHANGE OF <glpca>-ryear.
ADD 1 TO cnt_ryear.
ENDON.
ON CHANGE OF <glpca>-rvers.
ADD 1 TO cnt_rvers.
ENDON.
ON CHANGE OF <glpca>-rbukrs.
ADD 1 TO cnt_bukrs.
CALL FUNCTION 'G_CURRENCY_FROM_CT_GET'
EXPORTING
bukrs = <glpca>-rbukrs
ct = '10'
IMPORTING
currency = hsl_curr.
ENDON.
* externe Immobilienbezeichnung "ww/kb
* on change of i_glpca-imkey.
IF ( NOT <glpca>-imkey IS INITIAL ).
CALL FUNCTION 'REMD_IMKEY_TO_EMPGE'
EXPORTING
i_imkey = <glpca>-imkey
i_dabrz = <glpca>-dabrz
* I_length = 20
IMPORTING
e_empge = <glpca>-empge
e_konty = <glpca>-konty
EXCEPTIONS
not_found = 1.
IF sy-subrc NE 0.
CLEAR <glpca>-empge.
CLEAR <glpca>-konty.
ENDIF.
* CONCATENATE I_GLPCA-KONTY I_GLPCA-EMPGE INTO I_GLPCA-IMBEZ.
ENDIF.
* endon.
* on change of i_glpca-dabrz.
* call function 'REMD_IMKEY_TO_EMPGE'
* exporting
* i_imkey = i_glpca-imkey
* i_dabrz = i_glpca-dabrz
** i_length = 20
* importing
* e_empge = i_glpca-empge
* e_konty = i_glpca-konty.
** CONCATENATE I_GLPCA-KONTY I_GLPCA-EMPGE INTO I_GLPCA-IMBEZ.
* endon.
* Konvertierungsproblem mit PSP-Nummer bereinigen
IF NOT <glpca>-ps_psp_pnr IS INITIAL.
IF <glpca>-ps_psp_pnr EQ space.
CLEAR <glpca>-ps_psp_pnr.
ELSE.
WRITE <glpca>-ps_psp_pnr TO <glpca>-psppp.
CALL FUNCTION 'CONVERSION_EXIT_ABPSN_INPUT'
EXPORTING
input = <glpca>-psppp
IMPORTING
output = <glpca>-psppp.
ENDIF.
ENDIF.
* Währungen in Hilfsfeldern speichern
IF <glpca>-hsl_curr IS INITIAL.
<glpca>-hsl_curr = hsl_curr.
ENDIF.
IF <glpca>-ksl_curr IS INITIAL.
<glpca>-ksl_curr = ksl_curr.
ENDIF.
* modify i_glpca.
ENDIF.
ENDLOOP.
* Nachricht, wenn nicht alle Einzelposten angezeigt werden.
IF NOT s_message IS INITIAL.
MESSAGE s407(km) WITH auth_dbcount.
ENDIF.
* EP ausgeben...........................................................
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Einzelposten ausgeben'(p50).
t_layout-detail_initial_lines = 'X'.
t_layout-detail_popup = 'X'.
t_layout-f2code = 'PIC1'. "MICP40K039857
t_layout-get_selinfos = 'X'.
t_layout-group_change_edit = 'X'. "note 576149
PERFORM fill_listheader.
PERFORM fieldcat_fill.
PERFORM spec_groups_fill.
PERFORM events_fill. "MICP40K039857
">>MICP40K039857
* call function 'K_KKB_LIST_DISPLAY'
* exporting
* i_callback_program = 'Z_RCOPCA02_1
* i_callback_user_command = 'USR_CMD'
* i_callback_top_of_page = 'TOP_OF_PAGE'
** I_CALLBACK_END_OF_PAGE =
** I_CALLBACK_END_OF_LIST =
* i_callback_pf_status_set = 'SET_PF_STATUS'
** I_CALLBACK_LAYOUT_SAVE =
** I_CALLBACK_FIELDCAT_SAVE =
* i_tabname = 'I_GLPCA'
* is_layout = t_layout
* it_fieldcat = t_fieldcat
** I_FCTYPE = 'R'
** IT_EXCLUDING =
* it_special_groups = t_spec_groups
** IT_SORT =
** IS_SEL_HIDE =
** I_SCREEN_START_COLUMN = 0
** I_SCREEN_START_LINE = 0
** I_SCREEN_END_COLUMN = 0
** I_SCREEN_END_LINE = 0
* tables
* t_outtab = i_glpca
* exceptions
* others = 1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
* CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
i_callback_program = 'Z_RCOPCA02_1'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USR_CMD'
i_structure_name = 'I_GLPCA'
is_layout = t_layout
it_fieldcat = t_fieldcat
* IT_EXCLUDING =
it_special_groups = t_spec_groups
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
i_default = 'X'
i_save = g_save
is_variant = g_variant
it_events = t_events
* IT_EVENT_EXIT =
* IS_PRINT =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = i_glpca
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.
"<<MICP40K039857
CLEAR i_glpca.
*& Form CHECK_REPO_AUTHORITY
* Check only new auth-object K_PCA *
* --> p1 text
* <-- p2 text
FORM check_repo_authority CHANGING authorized LIKE authorised.
* fill structure for userexit in K_PCA_RESP_AUTHORITY_CHECK
DATA: auth LIKE pca_i_auth. "46a MIC check K_PCA and G_GLTP
auth-bukrs = <glpca>-rbukrs.
auth-rldnr = <glpca>-rldnr.
auth-rvers = <glpca>-rvers.
auth-rrcty = <glpca>-rrcty.
CLEAR authorized.
* check PrCtr/account/activity
CALL FUNCTION 'K_PCA_RESP_AUTHORITY_CHECK'
EXPORTING
i_kokrs = <glpca>-kokrs
i_prctr = <glpca>-rprctr
i_kstar = <glpca>-racct
i_vorgn = 'REPP'
i_actvt = '28'
i_auth = auth
i_no_dialog_message = 'X'
EXCEPTIONS
no_authority = 1
data_missing = 2
OTHERS = 3.
IF sy-subrc = 0. "ok
* check ledger/version/record type
CALL FUNCTION 'PCA_G_GLTP_AUTH_CHECK'
EXPORTING
rldnr = <glpca>-rldnr
rvers = <glpca>-rvers
rrcty = <glpca>-rrcty
EXCEPTIONS
no_authorisation = 1
OTHERS = 2.
IF sy-subrc = 0. "ok, User is authorized
authorized = 'X'.
ENDIF.
ENDIF.
ENDFORM. " CHECK_REPO_AUTHORITY
*& Form INIT_VARS
* Initialisieren diverser Hilfsvariablen und -tabellen *
FORM init_vars.
DATA BEGIN OF nametab OCCURS 80. "Tabelle mit Feldern aus der RPCA2
INCLUDE STRUCTURE dntab.
DATA END OF nametab.
SELECT SINGLE * FROM t000
CLIENT SPECIFIED
WHERE mandt = sy-mandt.
REFRESH nametab.
CALL FUNCTION 'NAMETAB_GET'
EXPORTING
only = 'T'
tabname = 'RPCA2'
TABLES
nametab = nametab.
* Übernehmen der Feldnamen, die auch in der GLPCA
* vorkommen.
LOOP AT nametab WHERE fieldname NE 'KSL_CURR'
AND fieldname NE 'HSL_CURR'
AND fieldname NE 'EMPGE' "ww/kb
AND fieldname NE 'KONTY'. "ww/kb
MOVE nametab-fieldname TO tab_fields-name.
APPEND tab_fields.
ENDLOOP.
* fill Fields of receiver for BBS "MIC46C
CALL FUNCTION 'RSTI_REPORT_FIELDS_FIND'
EXPORTING
e_repid = 'Z_RCOPCA02_1'
e_type = 'R'
TABLES
it_fields = bbs_fieldtab.
* correct fieldnames
READ TABLE bbs_fieldtab WITH KEY rfield = 'PRCTR'.
IF sy-subrc = 0.
bbs_fieldtab-rfield = 'RPRCTR'.
MODIFY bbs_fieldtab INDEX sy-tabix.
ENDIF.
READ TABLE bbs_fieldtab WITH KEY rfield = 'PPRCTR'.
IF sy-subrc = 0.
bbs_fieldtab-rfield = 'SPRCTR'.
MODIFY bbs_fieldtab INDEX sy-tabix.
ENDIF.
READ TABLE bbs_fieldtab WITH KEY rfield = 'BUKRS'.
IF sy-subrc = 0.
bbs_fieldtab-rfield = 'RBUKRS'.
MODIFY bbs_fieldtab INDEX sy-tabix.
ENDIF.
* Unicode
CLASS cl_abap_char_utilities DEFINITION LOAD.
CLEAR hex00 WITH cl_abap_char_utilities=>minchar.
CLEAR hexff WITH cl_abap_char_utilities=>maxchar.
ENDFORM. " INIT_VARS
* FORM FILL_LISTHEADER *
* List-Header in Abhängigkeit der selektierten Daten *
FORM fill_listheader.
READ TABLE i_glpca INDEX 1.
IF sy-subrc NE 0.
EXIT.
ENDIF.
t_listheader-typ = 'S'.
t_listheader-key = 'Ledger '(h01).
IF cnt_rldnr <= 1.
t_listheader-info = i_glpca-rldnr.
ELSE.
t_listheader-info = '*'.
ENDIF.
APPEND t_listheader.
t_listheader-typ = 'S'.
t_listheader-key = 'Kostenrechnungskreis'(h02).
IF cnt_kokrs <= 1.
t_listheader-info = i_glpca-kokrs.
ELSE.
t_listheader-info = '*'.
ENDIF.
APPEND t_listheader.
t_listheader-typ = 'S'.
t_listheader-key = 'Buchungskreis '(h03).
IF cnt_bukrs <= 1.
t_listheader-info = i_glpca-rbukrs.
ELSE.
t_listheader-info = '*'.
ENDIF.
APPEND t_listheader.
t_listheader-typ = 'S'.
t_listheader-key = 'Buchungsperiode '(h04).
IF cnt_poper <= 1.
t_listheader-info = i_glpca-poper.
ELSE.
t_listheader-info = '*'.
ENDIF.
APPEND t_listheader.
IF cnt_ryear <= 1.
t_listheader-typ = 'S'.
t_listheader-key = 'Geschäftsjahr '(h05).
t_listheader-info = i_glpca-ryear.
APPEND t_listheader.
ENDIF.
t_listheader-typ = 'S'.
t_listheader-key = 'Version '(h06).
IF cnt_rvers <= 1.
t_listheader-info = i_glpca-rvers.
ELSE.
t_listheader-info = '*'.
ENDIF.
APPEND t_listheader.
ENDFORM. "fill_listheader
*& Form FIELDCAT_FILL
*& Aufbau des Feldkataloges für den K_KKB_LIST_DISPLAY, *
*& bzw REUSE_ALV_LIST_DISPLAY, *
*& weitere Infos enthält die FktBaustein-Doku *
FORM fieldcat_fill.
DATA: i TYPE i VALUE 0.
REFRESH t_fieldcat.
* Ledger
* if cnt_rldnr > 1.
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RLDNR'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
* afield-key = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* endif.
* Satzart
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RRCTY'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* Version
* if cnt_rvers > 1.
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RVERS'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* endif.
* Periode
* if cnt_poper > 1.
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'POPER'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* endif.
* Geschäftsjahr
* if cnt_ryear > 1.
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RYEAR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* endif.
* Referenzbelegtyp
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'REFDOCCT'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '2'.
afield-seltext_s = 'Typ'(t01).
afield-seltext_m = 'Belegtyp'(t02).
afield-seltext_l = 'Ref.Belegtyp'(t03).
afield-outputlen = 3. "Platz für die Sterne der Zwischensummen
* if not show_ref is initial.
afield-key = 'X'.
* else.
* afield-no_out = 'X'.
* endif.
APPEND afield TO t_fieldcat.
* Referenzbelegnummer
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'REFDOCNR'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '2'.
afield-seltext_s = 'Refbeleg'(t04).
afield-seltext_m = 'Refbelegnr'(t05).
afield-seltext_l = 'Ref.Belegnummer'(t06).
* if not show_ref is initial.
afield-key = 'X'.
* else.
* afield-no_out = 'X'.
* endif.
APPEND afield TO t_fieldcat.
* Referenzbelegzeile
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'REFDOCLN'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '2'.
afield-seltext_s = 'Zeile'(t07).
afield-seltext_m = 'Belegzeile'(t08).
afield-seltext_l = 'Ref.Belegzeile'(t09).
* if not show_ref is initial.
afield-key = 'X'.
* else.
* afield-no_out = 'X'.
* endif.
APPEND afield TO t_fieldcat.
* Belegtyp PCA
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'DOCCT'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '1'.
afield-outputlen = 3. "Platz für die Sterne der Zwischensummen
* if show_ref is initial.
afield-key = 'X'.
* else.
afield-no_out = 'X'.
* endif.
APPEND afield TO t_fieldcat.
* Belegnummer PCA
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'DOCNR'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '1'.
* if show_ref is initial.
afield-key = 'X'.
* else.
afield-no_out = 'X'.
* endif.
APPEND afield TO t_fieldcat.
* Belegzeile PCA
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'DOCLN'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-sp_group = '1'.
* if show_ref is initial.
afield-key = 'X'.
* else.
afield-no_out = 'X'.
* endif.
APPEND afield TO t_fieldcat.
* Kostenrechnungskreis
* if cnt_kokrs > 1.
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'KOKRS'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
* endif.
* Buchungskreis
* if cnt_bukrs > 1.
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RBUKRS'.
afield-ref_tabname = 'GLPCA'.
afield-key_sel = 'X'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
afield-seltext_s = 'BuKrs'(b01).
afield-seltext_m = 'BuKrs'(b02).
afield-seltext_l = 'Empfänger-BuKrs'(b03).
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* endif.
* Profit Center
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RPRCTR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
* Eliminierungs-Profit-Center
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'EPRCTR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
* Sender-Profit-Center
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'SPRCTR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
* Konto
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RACCT'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
ADD 1 TO i.
* Kontentext
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RACCT_KTEXT'.
afield-no_sum = 'X'.
afield-ref_tabname = 'RPCAK'.
afield-ref_fieldname = 'KTEXT'.
afield-seltext_s = 'Kont-txt.'(m11).
afield-seltext_m = 'Kontentext'(m12).
afield-seltext_l = 'Kontentext'(m13).
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
ADD 1 TO i.
* Statistische Kennzahl
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'STAGR'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '12'.
APPEND afield TO t_fieldcat.
* Soll/Haben-Kennzeichen
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'DRCRK'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* Wert in Profit-Center-Währung
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'KSL'.
afield-do_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
* AFIELD-SELTEXT_S = 'PrCtr-Hauswhr.'(P01).
* AFIELD-SELTEXT_M = 'PrCtr-Hauswährung'(P02).
* AFIELD-SELTEXT_L = 'Profit-Center-Hauswährung'(P03).
afield-cfieldname = 'KSL_CURR'.
afield-sp_group = '3'.
APPEND afield TO t_fieldcat.
* Währungsschlüssel KSL
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'KSL_CURR'.
afield-ref_tabname = 'TKA01'.
afield-ref_fieldname = 'PCACUR'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
afield-seltext_s = 'PrCtrHW'(t10).
afield-seltext_m = 'Währungsschl. PrCtrHW'(t11).
afield-seltext_l = 'Währungsschl. PrCtrHW'(t12).
afield-sp_group = '3'.
APPEND afield TO t_fieldcat.
* Betrag in Hauswährung
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'HSL'.
afield-do_sum = 'X'.
afield-no_out = 'X '.
afield-ref_tabname = 'GLPCA'.
afield-cfieldname = 'HSL_CURR'.
afield-sp_group = '4'.
APPEND afield TO t_fieldcat.
* Währungsschlüssel Hauswährung
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'HSL_CURR'.
afield-ref_tabname = 'T001'.
afield-ref_fieldname = 'WAERS'.
afield-no_sum = 'X'.
afield-no_out = 'X '.
afield-seltext_s = 'BukrW.'(t13).
afield-seltext_m = 'Währungsschl. BukrW'(t14).
afield-seltext_l = 'Währungsschl. BukrW'(t15).
afield-sp_group = '4'.
APPEND afield TO t_fieldcat.
* Betrag in Transaktionswährung
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'TSL'.
afield-no_out = 'X '.
afield-ref_tabname = 'GLPCA'.
afield-cfieldname = 'RTCUR'.
afield-sp_group = '5'.
APPEND afield TO t_fieldcat.
* Währungsschlüssel Transaktionswährung
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RTCUR'.
afield-ref_tabname = 'GLPCA'.
afield-ref_fieldname = 'RTCUR'.
afield-no_sum = 'X'.
afield-no_out = 'X '.
afield-seltext_s = 'TW '(t16).
afield-seltext_m = 'Währungsschl. TW'(t17).
afield-seltext_l = 'Währungsschl. TW'(t18).
afield-sp_group = '5'.
APPEND afield TO t_fieldcat.
* Menge
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'MSL'.
afield-qfieldname = 'RUNIT'.
afield-no_out = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '6'.
APPEND afield TO t_fieldcat.
* Mengeneinheit
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RUNIT'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-sp_group = '6'.
APPEND afield TO t_fieldcat.
* Herkunftsobjektart
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RHOART'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
* Funktionsbereich
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RFAREA'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '7'.
APPEND afield TO t_fieldcat.
* Objektklasse
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'RSCOPE'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* G/L-Vorgang
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'ACTIV'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-seltext_s = 'Vorg.'(t31).
afield-seltext_m = 'Vorgang'(t32).
afield-seltext_l = 'Betriebswirt. Vorgang'(t33).
afield-sp_group = '1'.
APPEND afield TO t_fieldcat.
* Geschäftsbereich
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'GSBER'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* Kostenstelle
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'KOSTL'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '9'.
APPEND afield TO t_fieldcat.
* CO-Auftrag
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'AUFNR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-sp_group = '9'.
APPEND afield TO t_fieldcat.
* Projekt
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'PSPPP'.
afield-no_sum = 'X'.
afield-no_out = 'X'.
afield-sp_group = '9'.
afield-ref_tabname = 'PRPS'.
afield-ref_fieldname = 'POSID'.
APPEND afield TO t_fieldcat.
* Debitor
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'KUNNR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-seltext_s = 'Debitor'(d01).
afield-seltext_m = text-d01.
afield-seltext_l = text-d01.
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* Customer Name
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'C_NAME1'.
afield-no_sum = 'X'.
afield-ref_tabname = 'KNA1'.
afield-no_out = 'X'.
afield-seltext_s = 'Customer Name'.
afield-seltext_m = 'Cust Name'.
afield-seltext_l = 'C Name'.
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* Kreditor
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'LIFNR'.
afield-no_sum = 'X'.
afield-ref_tabname = 'GLPCA'.
afield-no_out = 'X'.
afield-seltext_s = 'Kreditor'(k01).
afield-seltext_m = text-k01.
afield-seltext_l = text-k01.
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* Vendor name
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'NAME1'.
afield-no_sum = 'X'.
afield-ref_tabname = 'LFA1'.
afield-no_out = 'X'.
afield-seltext_s = 'Vendor Name'(v01).
afield-seltext_m = text-v01.
afield-seltext_l = text-v01.
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* Withholding tax rate
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'V_RATE'.
afield-no_sum = 'X'.
afield-ref_tabname = 'WITH_ITEM'.
afield-no_out = 'X'.
afield-seltext_s = 'Withholding tax rate'.
afield-seltext_m = 'With. tax rate'.
afield-seltext_l = 'W. Tax rate'.
afield-sp_group = '8'.
APPEND afield TO t_fieldcat.
* Withholding Tax Base Amount
ADD 1 TO i.
CLEAR afield.
afield-col_pos = i.
afield-fieldname = 'QSSHB'.
afield-no_sum = 'X'.
afield-ref_tabname = 'Hi pavan.
something is definitely wrong with your code: You have an internal table for display with fields from rpca 2 and additional some more fields. I do not see a field ORT01 for CITY or PSTLZ for POSTAL CODE, at least to in table GLPCA from where the data are extracted.
You must fill PSTLZ and ORT01 (if it is for the supplier):
SELECT SINGLE * FROM LFA1
WHERE LIFNR = <glpca>-LIFNR AND
SPRAS = SY-LANGU.
IF SY-SUBRC eq 0.
<glpca>-name1 = lfa1-name1.
<glpca>-adrnr = lfa1-adrnr.
<glpca>-stras = lfa1-stras.
**** add here: ***
select single ort01 pstlz
into corresponding fields of <glpca>
from adrc
where adrnr = <glpca>-adrnr.
ENDIF.
Make sure that fields ORT01 and PSTLZ are defined for internal table i_glpca.
Regards,
Clemens -
One doubt on CRM Workflow.
Hi All,
I have a clarification to be made.
Below are some requirements from a CRM project. Now we are planning to train some one to handle this part and essentialy his role is on Workflow. Now my doubt is whether this person should take CRM training or workflow training? One thing to note here is that the person does not have any CRM background also. So my question is whether this person needs to take Workflow training or CRM training( I am not sure whether CRM training has workflow in it) or something else(meaning first CRM and then Workflow, since the project is on CRM)?
The requirements are in bold.
<b>1. Ability to define a Customer Program, including, but not limited to:
will adhere to role based security
informational program characteristics
program eligibility rules
technical prerequisites (e.g. equipment)
program specific options (e.g. bill protection)
enrollment related work flow steps and prerequisites
funding accounts
<i>Comments : Standard SAP functionality. May need workflow</i>
2.Ability to automatically enable or disable program functions.
<i>Comments : Workflow or Actions can be used.</i>
3.Ability to generate automated notifications/ticklers when program steps need to be taken.
<i>Comments : Workflow or Actions can be defined to trigger Notification on certain events.</i>
4. Notify appropriate Program Manager if measure factors or incentive rates are changed.
<i>Comments : Need workflow or Actions to trigger this.</i>
5. Associate the completed audits to actual programs and when applicable tie to a programs workflow requirements.
<i>Comments : Link is Standard SAP Functionality and needs to define workflow.</i>
6. Ability to generate customer communications based on triggers such as; dates, changes to customer information, work flow steps, etc.
<i>Comments : Needs to develop workflow or actions to trigger Notifications on pre-defined rules.</i>
7. Based on program, allow for multiple incentives or timed incentives based on workflow process completion steps.
<i>Comments : Need to be configured in Rebate Processing</i>
</b>
Thank you,
Regards,
ManeshHi,
The steps which u have done al are correct
Find the information below for BWA1,BWA5 and BWA7
BWA1:
1.BW adapter which will give you meta data information and if you want to chnage any settings relatede to mapping or if you want add any BDOC mapping you can do by using this Tcode
2. We c an copy BW adapter data source and we can create custom BW adapter data data source by using copy function
3. We can change the selection conditions for the data source
4. we can bdoc mapping information under mapping tab,if you want to add any new field to map with new bdoc segment ,we have to map here;for ex if you want to extract Extractnal reference number from 0CRM_SRV_PROCESS_H data source
we have to follow below steps
1.enhance Extract structure
2.Add bdoc mapping in BWA1 with perticular BDOC segment for example Sales bdoc segment mapped with Extractnal reference number
3.Add code in Mapping module of data sourc eto fetch data or write code in Badi CRM_BWA_MFLOW to fetch data for newly added fields
BWA5:it will show all activated BW adapter data source information under ACTIVE tab
BWA7: it will have all BW adapter delta enabled data source information,if your data source is not available under BWA7 ,that means you didnt enable delta for the same (not intialized )
Table information:
SMOXAFLD: Field List: Key Attributes for BWA Master Data Delta Queue
for example : DISTR_CHAN, PRODUCT_GUID, SALES_ORG are key fields for data source 0CRM_PRODSL_ATTR
SMOXRELP:BWA: Use of Segments and Fields in DataSources
BDOC segment mapping information fro the data source (which u have used in BWA1 under mapping tab)
SMOXRELP_S: Shadow Table for Table smoxrelp
which will give information about BW selection whether we can use this field for BW selection for data loading iof its marked for selection u can see in rsa3 selections. -
How can I speed up the extract() function queries on XML
Hi,
Please I need some light on xml and indexes.
This is my case:
I use Oracle 9i R2.
I have a table with some rows containing some few xml documents (each row contains a big xml document).
Given a value for an attribute of a tag, I want to extract the entire section within the tags.
Example:
<MYTAG number="1">
.....big stuff here
</MYTAG>
<MYTAG number="2">
.....big stuff here
</MYTAG>
<MYTAG number="x">
.....big stuff here
</MYTAG>
So for number=2 I would like to extract from the document the xmltype
<MYTAG number="2">
.....big stuff here
</MYTAG>
I created an index and have followed all the steps from the XML Database Developers Kit manual. Then I would use extrac() as the document says.
Now some doubts arised:
Are these text/xml indexes only useful for getting the rowid of my document?
I mean, if I select 'x' from the table looking for some value, then the index is used. But when I use extract in the select to get the section I look for, the query gets really low, specially when xml documents are big. I think when I have only row with one document, getting the rowid is not the problem, but the extraction from the document is.
Is the extraction process faster because of the index?
For what I see, the index only helps me to find the rowid, but then Oracle has to deal with the very big document inside the row. At that point Its oracle against a big text processing and index has nothing to do.
How can I speed up the extraction of the section?
If there any other index or tool for help extraction to be faster?
I would appreciate to know what can I do. I need help on this.
Thanks in advance!Well,
- What indexes, if any, already exist?
- What do the functions rl and nice do?
- What are the current query plans?
- How restrictive are the various predicates?
- What version of Oracle?
Justin -
Need suggestion on how to extract data from a table
Many years ago, I wrote many Perl scripts to increase my work productivity.
Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
What is the best way to code it? Java, PHP or other? If Java, any suggestion what classes/module and approach to use?
Thanks very much.xcomme wrote:
Many years ago, I wrote many Perl scripts to increase my work productivity.
Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
What is the best way to code it? It this a one shot (one time only task)? Then the best way is whatever way you are most comfortable with and which works.
If on going then I doubt language choice matters but using a html parser rather than attempting to parse it yourself is going to help in any language.
And are you starting with html files or starting with a http server? The two are very different.
Maybe you are looking for
-
Ipod nano - lost photos from ipod classic
I had an ipod classic on my pc and then installed an ipod nano for my daughter. It automatically synched with my library. She now has my songs but cannot import any music(it takes over 1 hour to imort 16 songs -then show durations of over 400 minutes
-
I've burnt a slideshow of my photos on my Apple Mac to a DVD+REW disc but it will not play on my DVD player or on a combined DVD/TV. However it will play on my wife's Acer laptop. I then erased the disc & burned another slideshow from my ancient Dell
-
POs for service and account assignment
Hi, I'm crearting a purchase order for services with item category P and account category K. Actually the system doesn't assign automatically the G/L account in the field Account assignment of POs. I set in T030, in transaction GBB, valuation modific
-
Item not relevant for Billing in STO case
Hi, I have created the invoice from NL Delivery type but then i cancel the same invoice. Now i am going to create again the invoice ,it is saying item is not relevant for invoice. i have check everything and it is fine as Billing Relevance is "J' in
-
Image problems with keynote dropbox
We are having massive problems with images not appearing correctly in our Keynote when saved via dropbox. Images appear swaped with other images, or at times, completely missing all together. This has completely crippled the work flow at our business