Problem in LDB
Hello Gurus,
I am working on a Report on ASSET ACTIVITY BY DATE RANGE .
The program is copied from std. program S_ALR_87011990.
The above std. program displays for the whole financial year. This is modified for a particalar period range in the new leveraged program.
My question is in the below code.
We are fetching data using LDB ADA. The statement "GET anlcv" works fine here, I mean Sy-subrc is 0 and anlcv structure has some data in it.
When it comes to statement "GET anepv" in the below code, we are not getting any data into that structure and sy-subrc NE 0. Then it is skipping all the get statements and directly going to statement " PERFORM abga_simulieren.".
My logic lies in between this Get statement and the perform statement. When i see it in debugging mode my statement is not executed at all.
What needs to be done. Please anyone help me.
GET anlcv.
CHECK select-options.
MOVE anlcv TO sav_anlcv.
GET anepv.
CHECK select-options.
Nur Bewegungen des Jahres des Berichtsdatums durchlassen.
CHECK anepv-bzdat GE sav_gjbeg.
CHECK anepv-bzdat IN so_bzdat. "Added for SIR-3132
Bewegungen in SAV_ANEPV sammeln.
MOVE anepv TO sav_anepv.
APPEND sav_anepv.
GET anlb LATE.
Check auf Bestandskonto bei Gruppensummen erst hier, wegen
fehlender Abgänge/Umbuchungen
IF NOT summb IS INITIAL.
IF NOT anlav-ktansw IN so_ktanw.
REJECT 'ANLAV'.
ENDIF.
ENDIF.
ANLCV aus Save-Area zurueckholen.
CHECK NOT sav_anlcv-anln1 IS INITIAL.
MOVE sav_anlcv TO anlcv.
Abg-Simu: Abgang simulieren.
PERFORM abga_simulieren.
Promise to reward points
Regards
Mac
Dear Raymond,
I tried debugging the FM but it is not stopping at the perform you mentioned.
Then I opted for CALL FUNCTION 'LDB_CALL_LDB_PROCESS' starting new task v_task_id.
If I don't use "starting new task v_task_id" it gives dump at the following part of 'LDB_CALL_LDB_PROCESS' , stating Result table incompatible.
CALL FUNCTION 'LDB_CALLBACK'
DESTINATION 'BACK'
TABLES
CALLBACK_TAB = G_CALLBACK
RESULTS = RESULTS
LDBNODES = I_LDBS.
But if I use CALL FUNCTION 'LDB_CALL_LDB_PROCESS' starting new task v_task_id then it does n't give me any results.
Kindly help.
Regards,
Vikas
Similar Messages
-
Peculiar problem in LDB ADA with company code selection
<h5>Hello Colleagues, </h5>
Faced a peculiar problem with company code selections in LDB ADA. Entered depreciation area, dep posting perios, lower and higher value of company code and would like to except few companies from selections. On pressing extension button, error message "Depreciation area 01 is not defined in chart of depreciation" is popping up and not allowing to provide exceptions for company codes. But working well in development systems. We are using ECC 6.0 systems and in both systems we have same lines of code for SAPDBADA.
During debug, found that in development system, control coming to initial statements after PAI event. But in other systems, control skips few initial commands after PAI and directly jumps to later commands. Due to this FNAME parameter in PAI subroutine setting with '*' in other systems and 'BUKRS' in dev system.
Could anybody give me some thoughts of why system behaving differently?
Thanks and Regards,
PrasanthSome - or most? - ODBC driver, especially MS for SQLServer and Access, don't support these advanced JDBC features.
Like the messages says: they are optional features, and the driver doesn't implement them.
A good news:
you don't need them.
Just go through your ResultSets only forward by next(), and do all inserts, updates and deletes with executeUpdate() and SQL commands. -
hi guru's
help me oout with that is wrong with the following code it gives me an error in extendeed syntax check.
and that too 25 messages.
i am using the LDB ADA and the code is as follows.
TABLES: anlav,
data begin of itab_anlav,
include STRUCTURE anlav.
end of itab_anlav.
select-options: ktansw type anlav-ktansw.
GET anlav FIELDS bukrs ktogr.
MOVE-CORRESPONDING anlav TO itab_anlav.
PERFORM zf_process_anlav USING anlav .
FORM zf_process_anlav USING anlav STRUCTURE anlav.
wa_asset-bukrs = anlav-bukrs.
endform.
helpful replies will be rewarded.hii
ya sure ..i found some syntax error in your program so i told you to check that as i copied your program in to my program ..i got some error..i tried to solve it like follows..check or just copy this code
TABLES: anlav.
data begin of itab_anlav.
include STRUCTURE anlav.
data end of itab_anlav.
select-options: ktansw for anlav-ktansw.
GET anlav FIELDS bukrs ktogr.
MOVE-CORRESPONDING anlav TO itab_anlav.
PERFORM zf_process_anlav USING anlav .
FORM zf_process_anlav USING anlav STRUCTURE anlav.
i hope this can help you to solve your problem.
regards
twinkal -
Hai Gurus,
I had a problem while checking an Logical DataBase Program.
I have created One Structure(SE36) name ZCVTEST and I have taken two Nodes
First One is LFA1 and brach node is LFB1.
and i have write in selctions :
SELECT * FROM LFA1
WHERE LIFNR IN SLIFNR.
and my problem is while checking it will shown an error.
The databse program SAPDBZCVTEST must have type '1' in the attributes.
why this happen .
and i wants to execute simple DataBaseProgram using Two nodes Root Node is LFA1 and branch node is LFB1.
I wants to the steps during Structure, Selection and DataBase program Attributes in SE36.
Please Help, Me ..Hi Reddy..
We cannot Test/Execute the LDB in SE36.
First activate ur LDB in SE36.
Then
In SE38 create a new Report.
In the Attributes of the Report Assign the LDB.
In the Source code of the Report :
<b>
TABLES : LFA1, LFB1.
Get LFA1.
WRITE :/ LFA1-LIFNR,
LFA1-NAME.
Get LFB1.
WRITE :/ LFb1-LIFNR,
LFb1-BUKRS.</b>
<b>reward if Helpful.</b> -
Hai Gurus,
I had a problem while checking an Logical DataBase Program.
I have created One Structure(SE36) name ZCVTEST and I have taken two Nodes
First One is LFA1 and brach node is LFB1.
and i have write in LogicalDataBase Program
SELECT * FROM LFA1
WHERE LIFNR IN SLIFNR.
and my problem is while checking it will shown an error.(in SE36)
Error Msg:The databse program SAPDBZCVTEST must have type '1' in the attributes.
why this happen .
and i wants to execute simple DataBaseProgram using Two nodes Root Node is LFA1 and branch node is LFB1.
I wants to the steps during Structure, Selection and DataBase program Attributes in SE36.
Please Help, Me ..In the attributes for your program set the type to "1" (executable program).
Rob -
Report S_ALR_87011964
Hi,
While generating the report S_ALR_87011964, it get generated only with SAP_ALL. It is not generated for this other profiles which has this Tcode in Menu.
Env - SAP R/3 4.7. We are upto date in patch level. Could not locate any auth failures too. No SU53 report. It just says.. No data selected..
I tried with ST01 and ST05 also. Any help is appreciated.
Anything to do with S_ALV_LAYO ? I have this auth in both roles.
Thanks in advance..
SamThe problem is LDB ADA
In OSS search for "Authorization ADA" hits
Four SAP Notes relevant
2. FI-AA-IS 141876 Authorization checks in asset reporting
3. FI-AA-IS 929732 Authorization checks: Correction Note 856248
4. FI-AA-IS 856248 Authorization checks in the asset reporting
5. FI-AA 941402 Authorization checks: Second correction of Note 856248 -
Facing Problem while Debugging a custom report using LDB
Hi Gurus,
I have requirement to modify a custom report program related to FI. This program used Logical database ZDF ( Copied original DDF) for data fetching.
when i am trying to see the data in debugging mode, its not allowing to check in start-of-selection event. only in the initialization & end-of-selection i could able to debug.
when i put breakpoint in initialization, it is allowing to see the flow till a Get Event occurs in the code, once a Get event occur the debugger is coming out and displaying the report.
If anybody faced this kind of problem when debugging a report using LDB, please share how you resolved it. If there are any other ways to debug a program of this kind please help me.
Thanks,
NandaHi Amith,
I checked that way also, i put break point in database program of the copied LDB, but its not allowing to check the flow in that program also.
Please suggest any other ways.
Thanks,
Nanda -
Hi Gurus,
I have a problem. I have created an HR report with PNP logical database. I created my own report category for the purpose. In the <b>Selection</b> option I have given
two select options. One is personnel number and the other is company code.
If I execute the program without entering anything in the selection screen the report
is selecting some values. In that the personnel number 2 is not present. My guess
is that the position of employee number 2 is wrong and becoz of this LDB is not selecting 2.
But if I fill company code with the value from personnel number 2, the employee 2
is getting selected. Why is this happening? Any pointers will be rewarded.
Regards,
AravindHi April,
The program is very simple and is as follows.
report zar_pnp.
nodes pernr.
infotypes: 0000, 0001,1000.
start-of-selection.
get pernr.
read table p0000 index 1.
if sy-subrc eq 0.
write / p0000-pernr.
endif.
read table p0001 index 1.
if sy-subrc eq 0.
write p0001-bukrs.
endif.
end-of-selection.
The personnel numbers which are not selected if you leave all fields on the selection screen blank have some defects like. 1)They have wrong position(position which does not exist in T528B). 2) They donot have organizational management infotype. 3) They donot have 0003 infotype.
I would like to know if a personnel number data has any such defect whether those
personnel number would not be selected?
But if an employee say 2 has no 0003 infotype, but has 0001 infotype. If we try to
select the records of 2 only giving personnel number nothing will be selected.
But if we provide company code employee 2 is selected.
Any explanation to the above behaviour?
Regards,
Aravind -
RE:pnp LDB selection screen problem
hi,
hi friends iam facing one problem regarding hr ABAP selection screen ,in my program iam using PNP LDB for bonus details report
i have using selection screen declaration present for single selection.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.
SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK B3.
based on this selection iam fetching the information from infotypes using macros.
now my requirement is iam fetch the information for multiple selections means like payroll areas z1,z2 and z3 payroll informations
should be fetching once. pls any body knows solution please give me reply.
thanks & regards,
mgrao.hi jain thanks for your reply, iam already created report category and assigned my report. here iam giving my report selection
declerations fully below.
S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. " DECLEARED REPORT CODE LEVEL
SELECT-OPTIONS: S_DATE FOR SY-DATUM NO-EXTENSION. "Bonus for Financial Year
PARAMETERS: P_BDATE TYPE SY-DATUM OBLIGATORY, "Bous payed as on
P_WKDAYS TYPE CHAR6. "No.of Working Days
SELECTION-SCREEN END OF BLOCK B1.
*SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006. " COMMENTED report level TAKING FROM LDB PNP
*SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION, " Payroll area
S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION, Personnel area
S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION, Personnel sub area
S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
*SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002. "REPORT CODE LEVEL SELECTION
PARAMETERS: P_FORMCP TYPE PIN_RATE, " char6, "Form C %
P_FORMEP TYPE PIN_RATE, " char6, "Exgratia %
P_FORMBP TYPE PIN_RATE. " char6 . "Bonus %
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-004.
PARAMETERS: L_REPORT TYPE ZHRD_FORMC AS LISTBOX VISIBLE LENGTH 40 OBLIGATORY . Report for list box 1 form c
SELECTION-SCREEN END OF BLOCK B4. 2 exgratia
the above selection is iam used first, now iam commented BLOCK B3 SELECTION PARAMETERS and taking the parameters from REPORT CATEGORY ASSINGN MENT.
MY PROBLEM is if i select one payroll area example z1 it showing all pay roll employees bonus details it is not filter the remaining payroll areas my requirement is what are the payrolls iam selecting those pay roll area details only displaying.
data fetching from INFOTYPES 0001,0002,0021 AND 9150 FOR BONUS DETAILS and out put is classical report format.
please kindly give the reply if you knows the solution.
thanks & regards ,
mgr. -
Problem with PCH LDB in HR.
Hi Friends,
I am working on a HR report using PCH LDB. Peculiarly its not returning objects (Positions/Jobs) maintained in other Languages when we select "All" as reporting period. It is returning all objects regardless of language when we select any other reporting periods.
Can any one suggest me what would be the problem and suggestions.
RajuHi,
Please check the SAP note : 18578 , this might give you an idea.
Regards,
Srini. -
Report (uses LDB's) giving dump due to memory problem
Hi,
I have a report which is giving dump in production due to memory problem.
Memory is increased from basis part,but still getting same error.
the report uses Logical DataBases.
Can anyone suggest solution to solve this problem.
regards
MallikHi Amit,
thanks for ur quick reply and ur idea "make changes in development and write the logic to read records in chunks".
I have n't worked on LDB's till now.So i Don't know how I can read the data in chunks from LDB's.
Can u Plz give some idea how to read data in chunks.
Iam also sending the code,if possible ,plz go thru it and give me some idea.
Hope u will help me.
CODE.
REPORT ZAROP028
ABLES: PROJ, " Project definition
PRPS_R, " WBS element
PRPS, " WBS elements
TJ02T, " System Status Values
TCJ1, " Project Types
JEST, " Active System Status
COSP1, " cost totals - external postings
COSS1, " cost totals - internal postings
COVP11, " Line Items by Prd & Doc Header
COVP12, " Line Items by Prd & Doc Header
BHDGD, " Page heading table.
AUFK, " Order Master Data for WBS (LDB)
ANEP, " Asset line item
COBRB, "Distribution Rules Settlement Ru
SETHIER, "Hierarchy Structure
TKA02, "Controlling Area Assignment
CEPC, "Profit Center Master Data
PSDYPD, "Dummy struct for GET proj late
PSDYPR, "Dummy struct for GET PRPS_R late
PSDYNP. "Dummy struct for GET AUFK late
CONSTANTS:
C_E TYPE C VALUE 'E',
C_I TYPE C VALUE 'I',
C_N TYPE C VALUE 'N',
C_X TYPE C VALUE 'X',
C_Y TYPE C VALUE 'Y',
C_NE(2) TYPE C VALUE 'NE',
C_EQ(2) TYPE C VALUE 'EQ',
C_USD(3) TYPE C VALUE 'USD',
C_04(2) TYPE C VALUE '04',
C_I0046(5) TYPE C VALUE 'I0046'
various working storage
DATA:
W_TXT04(4) TYPE C. " make status uppercase
DATA: ACTIVE(1) TYPE C VALUE 'A', " type for status_flag
INACTIVE(1) TYPE C VALUE 'I', " type for status_flag
STATUS_FLAG(1) TYPE C VALUE 'I', " wbs active or inactive?
INACTIVEDT LIKE SY-DATUM, " inactive date for wbs
REC_FLAG TYPE C VALUE 'N', " records retrieved?
DAYS_INACTIVE TYPE I, " days wbs has been inac
W_LOWINACT TYPE I, " smallest inactive days
WBS_CNT TYPE I, " cnt for wbs in status
W_AUC_COST TYPE P DECIMALS 2, " unsettled auc cost
W_VNAME LIKE PRPS_R-VNAME. " venture number storage
DATA: BEGIN OF ITAB OCCURS 0, "MELI-5F2KMH
COMPCODE LIKE PROJ-VBUKR, " company code
PLANT LIKE PROJ-WERKS, " plant
PROJECT LIKE PROJ-PSPID, " project
NAME LIKE PROJ-POST1, " project description
DINACT TYPE I, " days proj inactive
PRCTR LIKE PROJ-PRCTR, " profit center
SETID LIKE SETHIER-SETID, " level 2 pc hier
DESCRIPT LIKE SETHEADERT-DESCRIPT,
VERNA LIKE PROJ-VERNA, " person responsible
AUC TYPE P DECIMALS 2, " AUC unsettled amount
END OF ITAB.
DATA: BEGIN OF I_INACT OCCURS 0,
STAT LIKE JEST-STAT,
INACT LIKE JEST-INACT,
END OF I_INACT.
DATA: EQ_FLAG TYPE C, " system status flag
NE_FLAG TYPE C. " system status flag
TYPES: BEGIN OF T_COSTS,
PSPID LIKE PROJ-PSPID,
BUDAT LIKE COVP11-BUDAT,
END OF T_COSTS.
DATA: I_PROJ LIKE PROJ OCCURS 0 WITH HEADER LINE,
I_PRPS_R LIKE PRPS_R OCCURS 0 WITH HEADER LINE,
I_COSTS TYPE T_COSTS OCCURS 0 WITH HEADER LINE.
DATA: W_RECORDS TYPE I.
DATA: FOUND_FLAG TYPE C. " CHAD-4PRPDE
DATA: BEGIN OF I_HIER OCCURS 0. "FEAT-5BNRRP
INCLUDE STRUCTURE SETHIER. "FEAT-5BNRRP
DATA: END OF I_HIER. "FEAT-5BNRRP
RANGES: R_TJ02T FOR TJ02T-ISTAT.
DATA: W_LVL2 LIKE SETHIER-SETID. "MELI-5F2KMH
SELECTION-SCREEN BEGIN OF BLOCK PROJECT WITH FRAME TITLE TEXT-B01.
PARAMETERS: P_BUDAT LIKE COVP11-BUDAT,
DAYINACT(3) TYPE N DEFAULT '090'.
SELECTION-SCREEN SKIP. "FEAT-5BNRRP
PARAMETERS: P_PC-SET LIKE CEPC-KHINR OBLIGATORY "FEAT-5BNRRP
DEFAULT 'SCH_STREAM'. "FEAT-5BNRRP
SELECTION-SCREEN END OF BLOCK PROJECT.
SELECTION-SCREEN BEGIN OF BLOCK SORT WITH FRAME TITLE TEXT-B02.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(13) TEXT-C01.
SELECTION-SCREEN POSITION 15.
PARAMETERS: P_PLANT RADIOBUTTON GROUP SORT DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(13) TEXT-C03. "FEAT-5BNRRP
SELECTION-SCREEN POSITION 15.
PARAMETERS: P_PRCTR RADIOBUTTON GROUP SORT. "FEAT-5BNRRP
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(13) TEXT-C04.
SELECTION-SCREEN POSITION 15.
PARAMETERS: P_DAYS RADIOBUTTON GROUP SORT.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK SORT.
AT SELECTION-SCREEN OUTPUT.
PERFORM USER_PARM_INIT.
AT SELECTION-SCREEN.
PERFORM CHECK_PROJ_CRITERIA.
START-OF-SELECTION.
PERFORM BUILD_PC_HIER USING P_PC-SET.
Project Definition *
GET PROJ.
MOVE-CORRESPONDING PROJ TO I_PROJ. "MELI-5F2KMH
APPEND I_PROJ. "MELI-5F2KMH
CLEAR I_PROJ.
WBS element table
GET PRPS_R.
MOVE-CORRESPONDING PRPS_R TO I_PRPS_R.
APPEND I_PRPS_R.
CLEAR I_PRPS_R.
GET all order and cost objects associated with order and elements
GET AUFK.
GET COSP1.
CHECK COSP1-WRTTP EQ C_04. " check if value type '04'
Get last date that the wbselement was updated and determine status
GET COVP11.
MOVE PROJ-PSPID TO I_COSTS-PSPID.
MOVE COVP11-BUDAT TO I_COSTS-BUDAT.
APPEND I_COSTS.
CLEAR I_COSTS.
Loop through Internal cost statements
GET COSS1.
CHECK COSS1-WRTTP EQ C_04. " if value type is 04
Get last date that the wbselement was updated and determine status
GET COVP12.
MOVE PROJ-PSPID TO I_COSTS-PSPID.
MOVE COVP12-BUDAT TO I_COSTS-BUDAT.
APPEND I_COSTS.
CLEAR I_COSTS.
END-OF-SELECTION.
PERFORM BUILD_TABLE.
DELETE ITAB WHERE DINACT < DAYINACT.
DESCRIBE TABLE ITAB LINES W_RECORDS.
IF W_RECORDS = 0.
MESSAGE I024.
ENDIF.
PERFORM WRITE_REPORT.
FORM CHECK_PROJ_CRITERIA *
This form verifies correct selection criteria has been entered from *
the selection screen inputs. If incorrect data has been entered the*
valid information messages are displayed. *
FORM CHECK_PROJ_CRITERIA.
check for either posting date or inactivity criteria but not both
IF NOT P_BUDAT IS INITIAL AND NOT DAYINACT IS INITIAL.
MESSAGE E119.
ENDIF.
IF NOT DAYINACT IS INITIAL. "check s/o day inactive
IF NOT DAYINACT <= 998.
MESSAGE E018.
ELSE.
INACTIVEDT = SY-DATUM - DAYINACT.
ENDIF.
if days inactive is initial set INACTIVEDT using the posting date
ELSE.
INACTIVEDT = P_BUDAT.
ENDIF.
ENDFORM. " CHECK_PROJ_CRITERIA
FORM GET_AUC_COSTS *
This form retrieves AUC costs for records based on AUFK2 where they *
meet project criteria. This pulls the unsettled amount on a AUC as *
a settlement receiver. *
FORM GET_AUC_COSTS USING F_OBJNR F_BUKRS.
CONSTANTS:
C_SETLEMENT_ANNUAL LIKE COBRB-PERBZ VALUE 'JHR', "Annual Settlement
C_DEP_AREA_STD LIKE ANEP-AFABE VALUE '01'. "Std depreciation
DATA: L_ANLC LIKE ANLC OCCURS 0 WITH HEADER LINE,
L_ANLCV LIKE ANLCV OCCURS 0 WITH HEADER LINE,
BEGIN OF L_COBRB OCCURS 0, "SRIN-6ZNEAR
ANLN1 LIKE COBRB-ANLN1,
ANLN2 LIKE COBRB-ANLN2,
END OF L_COBRB,
F_H_COST TYPE P DECIMALS 2.
SELECT ANLN1 ANLN2 FROM COBRB
INTO TABLE L_COBRB " SRIN-6ZNEAR
WHERE OBJNR = F_OBJNR
AND PERBZ = C_SETLEMENT_ANNUAL.
IF SY-SUBRC NE 0. " gary-463qbd
EXIT. " gary-463qbd
ENDIF. " gary-463qbd
LOOP AT L_COBRB. " gary-463qbd
CLEAR: F_H_COST.
SELECT SINGLE * FROM ANLC
INTO L_ANLC
WHERE BUKRS = F_BUKRS AND
ANLN1 = L_COBRB-ANLN1 AND
ANLN2 = L_COBRB-ANLN2 AND
GJAHR = SY-DATUM(4) AND
AFABE = C_DEP_AREA_STD AND
ZUJHR = '0000' AND
ZUCOD = '0000'.
IF SY-SUBRC = 0.
CALL FUNCTION 'FI_AA_VALUES_CALCULATE'
EXPORTING
I_ANLC = L_ANLC
IMPORTING
E_ANLCV = L_ANLCV.
F_H_COST = L_ANLCV-BCHWRT_LFD.
ENDIF.
ADD: F_H_COST TO W_AUC_COST.
ENDLOOP. " gary-463qbd
ENDFORM. " GET_AUC_COSTS
FORM CHECK_INACTIVE_DATE *
This form checks the computed inactive date based on the formal *
parameter DAYS_INACTIVE. If DAYS_INACTIVE is more current than the *
current lowest inactive date W_LOWINACT then W_LOWINACT is replaced *
with this value. *
FORM CHECK_INACTIVE_DATE USING DAYS_INACTIVE.
IF DAYS_INACTIVE < W_LOWINACT.
MOVE DAYS_INACTIVE TO W_LOWINACT.
ELSEIF W_LOWINACT EQ 0.
MOVE: DAYS_INACTIVE TO W_LOWINACT,
W_LOWINACT TO ITAB-DINACT.
ENDIF.
ENDFORM. " CHECK_INACTIVE_DATE
FORM build_table *
collect fields to the internal table ITAB *
FORM BUILD_TABLE.
SORT I_COSTS BY PSPID ASCENDING BUDAT DESCENDING.
LOOP AT I_PROJ.
CLEAR W_AUC_COST.
READ TABLE I_COSTS WITH KEY PSPID = I_PROJ-PSPID
BINARY SEARCH.
IF SY-SUBRC = 0.
ITAB-DINACT = SY-DATUM - I_COSTS-BUDAT.
ELSE.
ITAB-DINACT = SY-DATUM - I_PROJ-ERDAT.
ENDIF.
LOOP AT I_PRPS_R WHERE PSPHI = I_PROJ-PSPNR AND
BELKZ = 'X'.
IF NOT I_PRPS_R-IMPRF IS INITIAL.
PERFORM GET_AUC_COSTS USING I_PRPS_R-OBJNR
I_PRPS_R-PBUKR.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
ITAB-COMPCODE = I_PROJ-VBUKR.
ITAB-PLANT = I_PROJ-WERKS.
ITAB-PROJECT = I_PROJ-PSPID.
ITAB-NAME = I_PROJ-POST1.
ITAB-PRCTR = I_PROJ-PRCTR.
ITAB-VERNA = I_PROJ-VERNA.
ITAB-AUC = W_AUC_COST.
IF ITAB-DINACT > DAYINACT.
PERFORM GET_HIER_INFO.
ENDIF.
APPEND ITAB.
CLEAR ITAB.
ENDLOOP.
ENDFORM. " BUILD_TABLE
FORM STATUS_CHECK *
Checks the active status of the project definition for the *
parameter values assigned. *
FORM STATUS_CHECK USING F_OBJNR.
begin of GARY-463QBD
CLEAR: I_INACT.
REFRESH: I_INACT.
MOVE: C_N TO EQ_FLAG,
C_Y TO NE_FLAG.
retrieve status for a given record
SELECT STAT INACT
INTO TABLE I_INACT
FROM JEST
WHERE OBJNR EQ F_OBJNR AND
INACT NE C_X.
sort internal status entered by user
SORT R_TJ02T BY OPTION DESCENDING.
check all current object statuses meet user entered criteria
LOOP AT R_TJ02T WHERE OPTION EQ C_NE.
check for user selected options
READ TABLE I_INACT WITH KEY STAT = R_TJ02T-LOW.
IF SY-SUBRC EQ 0.
MOVE C_N TO NE_FLAG.
EXIT.
ENDIF.
ENDLOOP.
LOOP AT R_TJ02T WHERE OPTION EQ C_EQ.
check for user selected options
READ TABLE I_INACT WITH KEY STAT = R_TJ02T-LOW.
IF SY-SUBRC EQ 0.
MOVE C_Y TO EQ_FLAG.
EXIT.
ENDIF.
ENDLOOP.
check for no statuses entered as EQ option
LOOP AT R_TJ02T WHERE OPTION EQ C_EQ.
EXIT.
ENDLOOP.
if so move c_y to eq_flag
IF SY-SUBRC NE 0.
MOVE C_Y TO EQ_FLAG.
ENDIF.
if both eq_flag or ne_flag are true(c_y) move true to valid_flag
IF ( EQ_FLAG EQ C_N OR
NE_FLAG EQ C_N ).
REJECT 'PRPS_R'.
ENDIF.
end of GARY-463QBD
ENDFORM. " STATUS_CHECK
Form WRITE_REPORT
FORM WRITE_REPORT.
IF P_PLANT EQ 'X'.
SORT ASCENDING BY ITAB-BUSAREA "FEAT-5BNRRP
SORT ITAB ASCENDING BY PLANT
PROJECT.
ELSEIF P_PRCTR EQ 'X'.
SORT ITAB ASCENDING BY PRCTR "FEAT-5BNRRP
PROJECT.
ELSE.
SORT ITAB ASCENDING BY DINACT
PROJECT.
ENDIF.
FORMAT COLOR COL_BACKGROUND INTENSIFIED ON.
"MELI-5F2KMH
LOOP AT ITAB. "MELI-5F2KMH
WRITE: / ITAB-COMPCODE,
9(4) ITAB-PLANT,
17(12) ITAB-SETID,
33(40) ITAB-DESCRIPT,
77(10) ITAB-PRCTR,
91(24) ITAB-PROJECT,
119(40) ITAB-NAME,
163(25) ITAB-VERNA,
192(15) ITAB-AUC CURRENCY C_USD,
211(8) ITAB-DINACT.
ENDLOOP.
ENDFORM. " WRITE_REPORT
Form USER_PARM_INIT
Initializes user parameter settings
FORM USER_PARM_INIT.
ENDFORM. " USER_PARM_INIT
At top of every page, generate Amoco-standard header.
TOP-OF-PAGE.
MOVE: '0' TO BHDGD-INIFL,
SY-LINSZ TO BHDGD-LINES,
SY-UNAME TO BHDGD-UNAME,
SY-REPID TO BHDGD-REPID,
SY-TITLE TO BHDGD-LINE1,
SPACE TO BHDGD-DOMAI,
SPACE TO BHDGD-SEPAR,
SPACE TO BHDGD-MIFFL.
IF P_PLANT EQ 'X'.
MOVE TEXT-H01 TO BHDGD-LINE2.
ELSE.
MOVE TEXT-H03 TO BHDGD-LINE2. "FEAT-5BNRRP
ENDIF.
temporarily clear sy-mandt to remove "europe" from header "FEAT-5BNRRP
DATA: W_MANDT LIKE SY-MANDT.
BHDGD-BUKRS = SPACE.
W_MANDT = SY-MANDT.
CLEAR SY-MANDT.
FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
PERFORM BATCH-HEADING(RSBTCHH0).
FORMAT RESET.
reset sy-mandt "FEAT-5BNRRP
SY-MANDT = W_MANDT.
PERFORM PGH_WRITE_HEADING USING TEXT-003 INACTIVEDT. "MELI-5F2KMH
SKIP 1.
ULINE.
write heading info
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE: /1(5)'CCode',
9(5)'Plant',
17(12)'Level 2 Node',
33(40)'Level 2 Node Description',
77(10)'Profit Ctr',
91(18)'Project Definition',
119(19)'Project Description',
163(18)'Person Responsible',
192(15)' AUC Unsettled',
211(13)'Days Inactive'.
end FEAT-5BNRRP
BEGIN FEAT-5BNRRP NEW FORMS
FORM BUILD_PC_HIER
FORM BUILD_PC_HIER USING SETID.
DATA: W_SETID LIKE SETHIER-SETID,
W_NEWSETID LIKE SETHIER-SETID.
CONCATENATE '0H' SETID INTO W_SETID.
CALL FUNCTION 'G_SET_GET_ID_FROM_NAME'
EXPORTING
SHORTNAME = W_SETID
TABNAME = 'GLPCT'
SETCLASS = '0106'
SUPRESS_POPUP = 'X'
OLD_SETID = W_NEWSETID
IMPORTING
NEW_SETID = W_NEWSETID.
CALL FUNCTION 'G_SET_TREE_IMPORT'
EXPORTING
CLIENT = SY-MANDT
LANGU = SY-LANGU
SETID = W_NEWSETID
TABNAME = 'GLPCT'
TABLES
SET_HIERARCHY = I_HIER
EXCEPTIONS
SET_NOT_FOUND = 1
ILLEGAL_FIELD_REPLACEMENT = 2
ILLEGAL_TABLE_REPLACEMENT = 3
OTHERS = 4.
CLEAR I_HIER.
ENDFORM.
FORM GET_HIER_INFO
FORM GET_HIER_INFO.
DATA: W_SETID LIKE SETHIER-SETID,
W_KHINR LIKE CEPC-KHINR,
W_INDEX TYPE I.
CLEAR: W_SETID,
W_KHINR,
W_INDEX.
DETERMINE PROFIT CENTER NODE
SELECT SINGLE KHINR
FROM CEPC
INTO W_KHINR
WHERE PRCTR EQ ITAB-PRCTR.
CONCATENATE '0106' I_PROJ-VKOKR W_KHINR
INTO W_SETID.
READ TABLE I_HIER WITH KEY
SETID = W_SETID.
IF SY-SUBRC EQ 0.
W_INDEX = SY-TABIX.
DO.
READ TABLE I_HIER INDEX W_INDEX.
IF W_INDEX = 0.
ITAB-SETID = 'Not Found'.
EXIT.
ENDIF.
IF I_HIER-LEVEL = 1.
ITAB-SETID = I_HIER-SETID+8(12).
ITAB-DESCRIPT = I_HIER-DESCRIPT.
EXIT.
ENDIF.
IF I_HIER-LEVEL = 2.
ITAB-SETID = I_HIER-SETID+8(12).
ITAB-DESCRIPT = I_HIER-DESCRIPT.
EXIT.
ENDIF.
W_INDEX = W_INDEX - 1.
ENDDO.
ELSE.
ITAB-SETID = 'Not Found'.
ENDIF.
ENDFORM.
END FEAT-5BNRRP NEW FORMS
*& Form PGH_WRITE_HEADING WR MELI-5F2KMH
FORM PGH_WRITE_HEADING USING L_V1 L_V2.
DATA: L_LINSZ LIKE SY-LINSZ.
DATA: L_TITLEL LIKE SY-TABIX.
DATA: L_START LIKE SY-TABIX.
DATA: L_DATE LIKE SY-DATUM.
DATA: L_FORMATTED_DATE(10) TYPE C.
DATA: L_TITLE(27) TYPE C.
MOVE L_V2 TO L_DATE.
WRITE L_DATE TO L_FORMATTED_DATE.
CONCATENATE L_V1 L_FORMATTED_DATE INTO L_TITLE
SEPARATED BY SPACE.
L_LINSZ = SY-LINSZ.
L_TITLEL = STRLEN( L_TITLE ).
L_START = ( L_LINSZ / 2 ) - ( L_TITLEL / 2 ) - 2.
NEW-LINE.
POSITION L_START.
WRITE: L_TITLE.
regards
Mallik -
Problem while creating HR report with PNP LDB
Hi Experts,
I am working on HR Report using LDB PNP.
In HR REPORT CATEGORY,i have mentioned "___00003" in Master Data radio button.
Now i can create my own selection screen.In my Selection-Screen i am using pushbutton.
Code is:
SELECTION-SCREEN:
PUSHBUTTON 5(15) but1 USER-COMMAND cli1,
PUSHBUTTON 30(15) but2 USER-COMMAND cli2.
INITIALIZATION.
but1 = 'PDF FORMAT'.
but2 = 'FILE FORMAT'.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
PERFORM PDF.
WHEN 'CLI2'.
PERFORM FILE.
ENDCASE.
While executing i have clicked on 2nd pusbutton.
It is going to CASE and also i am getting value of sscrfields = CLI2 .
also sy-subrc = 0.
but after that it is not going to WHEN condition.
Can anybody plz help me out in this.
Regards,
AnkurSSCRFIELDS is a structure so you have to ask:
CASE SSCRFIELDS-UCOMM.
WHEN xx.
ENDCASE: -
Hello,
I have modified a logical database to include new fields in selection view (dynamic selections).
When i execute the LDB from SE36, i can see the new custom field nodes in dynamic selections but i have used the same LDB in Attributes...
But i can find my ALL custom nodes/fields in the dynamic selection. I can see only 2 nodes in dynamic selections
Can anyone help me?
Regards,
ShivaDear Srikanth,
I second Sahidur. Forgot to update the thread.
Regards,
Veera
P.S. Thanks Sahidur
Edit:
The modified value should reflect at both the client, middleware/backend after one full successful sync cycle.
Edited by: Veeraraagavan R on Jan 12, 2009 10:30 AM -
Hi to all,
I am using LDB for ABAP Query. For this I given selection fields. I don't want selection screen as like standard one. Ex. For QM11 transaction what ever screen appering like that my query smae appering . Please give solution for this. I want my selection fields only in my selection screen while using LDB.
Thanks.Resolved
-
Coding ABAP using LDB PNP and authorizations problems
This post requires a blend of ABAP and HCM skills.
When coding my own ABAP using LDB PNP, the LDB will provide me with the employees selected but will skip those for which I do not have access (regarding Authorizations settings) to one or more of the infotypes declared in the program.
As a programmer I would like to receive from the LDB the information that an employee is skipped so that I can handle the exception.
Do you know how can I get this information from the LDB?
ThanksI dont know if PNP can do it but PNPCE can:
at END-OF-SELECTION call macro PNP_GET_AUTH_SKIPPED_PERNRS
it will provide a list of skiped PERNRs
for further info see docu PNPCE
Maybe you are looking for
-
ABAP OO Class and Change Documents
I have created a class based on the IF_WORKFLOW interface. I created a couple of events. I created a workflow task assigned to a custom method of the class. I setup the Material Change Document to trigger the class event when there is a change. T
-
Error when starting sun one serv 7
I have this problem when I try to start (asadmin start-appserv) sun one app serv 7 in linux red hat 8. Could not start the instance: domain1:admin-server server failed to start: abnormal subprocess termination Could not start the instance: domain1:se
-
Hello Guys!! I need throw a WF step calling a function inside a Report. Actually i am using SWW_WI_ADMIN_EXECUTE, but don´t work correctly. I can use another one function or Object Class? Anybody can help me please? Thanks. Best Regards. Juliá
-
Spectrum analyser in teststand
Hi everybody, I have a question about spectrum anlyser with teststand. I would like to use with teststand a spectrum analyser (IFR 2399C aéroflex). I have the driver and those files: Ifr2399.lib (msvc)
-
Internet toolkit 6.0.2
Hi all, Where can I find the internet tool kit for LabVIEW 8.6(Internet toolkit 6.0.2)? I searched in NI site. But I cannot able to find it? Could you please help me for finding this? I have 2010 toolkit. But no 6.0.2 for 8.6 version of LabVIEW Thank