Logic needed for FI BDC
Hi ,
I ned to write Bdc for the FI transaction f-53. In that BDC various entry is uploaded in trnsaction thr flat file . After Upload Document No is generted and it should stored in the excel file and at the last col of th flat file .
How to do this . I have no clue for thsi . How to capture valus of document no which is genrated ,
Thanks
You can also use parameter ID 'BLN' if you are calling individual transactions. Some variants of the FI transactions will use different success messages, so if you use a common routine for the call, you'll definitely want to use this approach instead of hardcoding message numbers and fields to read.
Before the call:
SET PARAMETER ID 'BLN' FIELD SPACE.
CLEAR GV_BELNR.
After the call, insert the proper error handling and for successful calls:
GET PARAMETER ID 'BLN' FIELD GV_BELNR. " GV_BELNR defined as type BELNR_D
Similar Messages
-
Fail safe logic needed for purchase order upload program
Hello all,
i am working on creating PO's by reading data from a text file. I need to implement fail safe logic in it, which is to make sure this program uploads all the records in the text file successfully. For example, i have 1000 records in my text file and while running the upload program if the program times out while creating the 500th PO or if SAP is down at that time, then we have 499 PO's created and 501 yet to be created. But if we run the same program again, we will generate duplicate PO's for 499 again. I want to avoid this kind of problem.
How do i implement this idea?
Kindly guide me on this.
Thanks.Ok ..
Then I would suggest you use Application Log to keep the success and error messages of PO processing.
You can check trsnaction SLG0 and create your own application log object.
Then you need to use FMs BAL_LOG_* to crate and add messages to it.
This way you will have a facility to check as which of your records are converted to PO for a run.
In case SAP gets down in between , still you can find the details using Xn SLG1 and then accordingly remove the records from your file which are already converted to PO.
Thanks,
Ram -
Logic Needed for MM Report with PR, PO, GR and Invoice details
Hi Experts,
We need to provide a list of below details as columns.
PR, PR creation date, PO, PO creation date, GR, GR creation date, Invoice and Invoice creation date.
Now on the selection screen we'll have Date range. If I give the dat range as 01.01.2011 to 31.12.2011, then the list should be displaying all the details. However, it should first check Invoices in that date range and mention the related details. If there are some GRs (for which invoice is not yet created) for that year, then the related details (PR, PO and GR) of that GR are to be shown. For POs (for which GR itself is not yet created), again details are to be shown (PR and PO details).
Can somebody help me in getting this done in some simpler way? I am thinking of fetching the data from the respective tables for this date range and then from invoice i will be printing and then deleting the corresponding GR, PO and PR. Then will be checking GR , printing the details and deleting corresponding PR and PO.. and so on. But I felt this not that great.
Can anyone suggest some other logic or provide some inputs?
Thanks.Hi,
As per your requirement you can cross the tables i.e. BSET,RSEG,RBKP(For Invoice Header n Item Details).Then now go to the MKPF,MSEG tables (For MIGO Details) and EBAN,EKKO,EKPO(For Purchase Requsitions,Orders Details).... Consider BUDAT as a selection date among the tables RSEG,MKPF,EKKO.
Regards,
Rickky -
Logic needed for report: Parameter Group
hi..friends,
im dev a report: refernce std report - "S_ALR_87012178" is the tcode. there they are giving 5 slabs: ie. under 'Output control Sel Scrn - in "Due date sorted List" '. but my requirement is to do same like that for 10 slabs.
the values are dynamic. Accordingly we should display the amount falling in that specified period.
i hav already fetched the data. but to display them, i hav struck.
how to access the input and print them.
i hav to use alv hierarchical seq display format.
My decl:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 01(30) text-050 for field p_slab1.
SELECTION-SCREEN POSITION POS_LOW.
PARAMETERS: p_slab1 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '15',
p_slab2 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '30',
p_slab3 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '45',
p_slab4 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '60',
p_slab5 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '75',
p_slab6 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '90',
p_slab7 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '115',
p_slab8 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '130',
p_slab9 LIKE rfpdo1-allgrogr OBLIGATORY DEFAULT '145'.
SELECTION-SCREEN END OF LINE.
suggest me logic pls.
regards,
Padmashree.Hi,
Try out this.
declare all the parameters in the block.
selection-screen begin of block b2 with frame .
parameter: declare all the parameters.
selection-screen end of block b2.
hope it may help you. -
Logic needed for dynamic report
Hi Experts,
I have made a dynamic report where my logic is if the value of the columns is 0 than it should be blank and if the columns of the stores have some value for eg: 01 than it should populate the same store.
The logic goes like :
for matnr 01store 02 store
01 100.00 0.00
02 00 00
03 50.00 13.00
than the output should be
matnr 01store 02 store
01 01store
02
03 01store 02 store
I have made the logic but all the lines are getting appended
it_field_dynamic1-fieldname = 'MATNR'.
it_field_dynamic1-desc = 'ARTICLE'.
it_field_dynamic1-reffield = 'MATNR'.
it_field_dynamic1-reftab = 'MBEW'.
it_field_dynamic1-seq = 1.
COLLECT it_field_dynamic1.
CLEAR wa_itab.
LOOP AT itab INTO wa_itab. "WHERE SALK3 NE '0.00'.
it_field_dynamic1-fieldname = wa_itab-bwkey.
it_field_dynamic1-desc = wa_itab-bwkey.
* IF WA_ITAB-SALK3 NE '0.00'.
* it_field_dynamic1-reffield = wa_itab-bwkey.
* ENDIF.
it_field_dynamic1-reftab = 'MBEW'.
it_field_dynamic1-seq = 1.
COLLECT it_field_dynamic1.
CLEAR wa_itab.
ENDLOOP.
LOOP AT it_field_dynamic1.
wa_alv_cat1-fieldname = it_field_dynamic1-fieldname.
wa_alv_cat1-col_pos = sy-tabix.
wa_alv_cat1-ref_field = it_field_dynamic1-reffield.
wa_alv_cat1-ref_table = it_field_dynamic1-reftab.
wa_alv_cat1-seltext = it_field_dynamic1-desc.
COLLECT wa_alv_cat1 INTO lt_alv_cat1 .
CLEAR wa_alv_cat1 .
* APPEND wa_alv_cat TO lt_alv_cat .
ENDLOOP.
IF NOT lt_alv_cat1[] IS INITIAL .
* Create Dynamic Table -> i_table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_alv_cat1
IMPORTING
ep_table = i_table1.
ASSIGN i_table1->* TO <table1> .
* Create dynamic work area and assign to FS
CREATE DATA i_struct1 LIKE LINE OF <table1>.
ASSIGN i_struct1->* TO <struc1>.
ENDIF.
DATA: l_row TYPE sy-index.
FIELD-SYMBOLS: <ls_table> TYPE ANY.
FIELD-SYMBOLS: <l_field> TYPE ANY.
DATA: wa_dref1 TYPE REF TO data.
FIELD-SYMBOLS: <wa_tab1> TYPE ANY.
CREATE DATA wa_dref1 LIKE LINE OF <table1>.
ASSIGN wa_dref1->* TO <wa_tab1>.
FIELD-SYMBOLS: <fs1>, <fs2>.
* DATA: wa_dref1 TYPE REF TO data.
* FIELD-SYMBOLS: <wa_tab1> TYPE ANY.
CREATE DATA wa_dref1 LIKE LINE OF <table1>.
ASSIGN wa_dref1->* TO <wa_tab1>.
CLEAR : wa_matnr, wa_itab.
LOOP AT imatnr INTO wa_matnr.
*clear: wa_itab-bwkey.
* CLEAR: wa_itab.
LOOP AT itab INTO wa_itab WHERE matnr = wa_matnr-matnr.
* CLEAR: wa_itab-bwkey.
IF wa_itab-salk3 EQ '0.00'.
CLEAR: wa_itab-bwkey .
ELSE.
ASSIGN COMPONENT wa_itab-bwkey OF STRUCTURE <wa_tab1> TO <fs1>.
IF sy-subrc = 0 . "AND WA_ITAB-SALK3 NE '0.00'.
<fs1> = wa_itab-bwkey.
ENDIF.
ENDIF.
*ON CHANGE OF WA_ITAB-MATNR.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <wa_tab1> TO <fs2>.
IF sy-subrc = 0.
* ON CHANGE OF wa_itab-matnr.
<fs2> = wa_itab-matnr.
* ENDON.
ENDIF.
* APPEND <wa_tab1> TO <table1>.
ENDLOOP.
APPEND <wa_tab1> TO <table1>.
CLEAR : wa_ltab.
ENDLOOP.
than i have called the alv grid display
Please let me know.
Thanks,
Nikhil.Hi Oliver,
My current output is:
for
matnr 01store 02 store
01 100.00 0.00
02 00 00
03 50.00 13.00
matnr 01store 02 store
01 01store
02 01store
03 01store
but for matnr 02, 01 store has 0 value hence it should come blank but its appending from the first line and populating 01store for material 2.
Thanks & Regards,
Nikhil. -
Logic need for my selection screen
Hi,
i designed my selection screen
PARAMETERS:
rb_alv RADIOBUTTON GROUP g2, " Radio 1
rb_pc RADIOBUTTON GROUP g2, " Radio 2
rb_unix RADIOBUTTON GROUP g2. " Radio 3
*File path
PARAMETERS: pa_ftxt TYPE rlgrap-filename.
Below isMy requirement is :How to do it???please help
Do not hard-code the directory output for Unix. Just make sure the selection logic checks to make sure a value exists in the path field if either download option (pc/unix) is set). For the PC default, use u2018c:\temp\veninfo.txtu2019 as a constant.
Thanks
asisPARAMETERS:
rb_alv RADIOBUTTON GROUP g2 user-command 'RAD', " Radio 1
rb_pc RADIOBUTTON GROUP g2, " Radio 2
rb_unix RADIOBUTTON GROUP g2. " Radio 3
*File path
PARAMETERS: pa_ftxt TYPE rlgrap-filename.
at selection-screen output.
if rb_pc = 'X'.
pa_ftxt = 'c:\temp\veninfo.txt'.
else.
clear pa_ftxt.
endif.
at selection-screen on value request for pa_ftxt.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = ' ' "here you can give the path of the server directory
IMPORTING
o_path = l_path
abend_flag = l_abend_flag
EXCEPTIONS
communication_failure = 1
system_failure = 2
rfc_error = 3.
IF sy-subrc EQ 0.
p_file = l_path. "This gives you the path
ENDIF.
IF l_abend_flag = 'X'.
EXIT.
else.
Move l_path to your screen field pa_ftxt.
ENDIF. -
Logic need for currency calculation
Hi All,
Can u pleae help me out to solve this requirement?
Sample code below;
1 declare
2 CURSOR C1 IS SELECT * FROM TEST2;
3 begin
4 DBMS_OUTPUT.PUT_LINE('From Currency'||' '||'To Currency'||' '||'Rate:');
5 FOR C2 IN C1 LOOP
6 DBMS_OUTPUT.PUT_LINE(c2.from_currency||' '||c2.to_currency||' '||c2.rate);
7 END LOOP;
8* end;
SQL> /
From Currency To Currency Rate:
GBP INR 75.1371
GBP AUD 1.5342
GBP USD 1.57291
Based on this i need to derive all the permutations and Combination of other currencie like INR to AUD,INR to USD,etc...
Please any one come across through such requirement Please help me to solve this requiremen.
Regards
RaaghavendraHello,
Is it what you need ?
with t as
(select 'GBP' fromCur ,'INR' ToCurr, 75.1371 rate from dual union all
select 'GBP', 'AUD' ,1.5342 from dual union all
select 'GBP', 'USD', 1.57291 from dual)
select t1.tocurr as calc_fromcurr,
t2.tocurr as calc_tocurr,
t2.rate/t1.rate as calc_rate
from t t1, t t2
where t1.tocurr!=t2.tocurr;regards,
Sylvie -
Logic needed for increment value
HI,
This function returns me if i pass 'ABC01' it will return 'ABC02' like if i pass
'ABC55' it will return 'ABC56'.
But my requirment is i need to pass value from 01 to 99.
so if i pass 'ABC99' it sud return ''ABC01'.
so the sequence is from 01 to 99.And after 99 it will again start from 01.
create or replace function get_next_value
string_1 in varchar2
return varchar2
as
v_string_1 number(10);
v_string_2 varchar2(10);
begin
select to_number(substr(string_1,4))+1 into v_string_1 from dual;
if length(v_string_1)=1 then
v_string_2:=substr(string_1,1,4)||v_string_1;
return v_string_2;
else
v_string_2:=substr(string_1,1,3)||v_string_1;
return v_string_2;
end if;
end;
test sript
select get_next_value('ABC01') from dual
select get_next_value('ABC55') from dual
Thanks,
Lonycreate or replace function get_next_value
string_1 in varchar2
return varchar2
as
v_string_1 number(10);
v_string_2 varchar2(10);
begin
select to_number(substr(string_1,4))+1 into v_string_1 from dual;
if length(v_string_1)=1 then
v_string_2:=substr(string_1,1,4)||v_string_1;
return v_string_2;
else
v_string_2:=substr(string_1,1,3)||v_string_1;
if v_string_1 = 100 then
return substr(string_1,1,3)||'01';
end if;
return v_string_2;
end if;
end;
select get_next_value('ABC01') from dual;
select get_next_value('ABC99') from dual;
GET_NEXT_VALUE('ABC01')
ABC02
1 rows selected
GET_NEXT_VALUE('ABC99')
ABC01 -
Logic needed for the following data
Hi All,
I have procedure in that I am calling a cursor to fetch the records. This query is returning the following data
DI
SZ
DII
CWT
Top
down
9 1/2
9.625
8.921
36
18
1602
13 1/2
13.375
12.515
61
19
1962
18 1/2
18.625
17.755
87.5
20
503
26
26
24.75
105
20
103
9 1/2
9.625
8.835
40
1602
3858
7
7
6.276
26
1683
6352
I want to print just these values ..
9 1/2
9.625
8.921
36
18
1602
9 1/2
9.625
8.835
40
1602
3858
7
7
6.276
26
1683
6352
As you can see in these values top and down are overlapping.
I tried several ways to sort the query on the fields and have some logic, but I am always getting one row extra which is not overlapping.
Can someone please give me the logic to get the desired result through conditions in Procedure/function/package
ThanksBrendanP wrote:
26 AND t.top
"AND t.top....."... what?
Here's another solution, giving the least overlap over the greatest distance...
SQL> ed
Wrote file afiedt.buf
1 with data as (select 1 id , 18 top, 1602 down from dual union all
2 select 2,19, 1962 from dual union all
3 select 3,20, 503 from dual union all
4 select 4,20, 103 from dual union all
5 select 5,1602, 3858 from dual union all
6 select 6,1683, 6352 from dual
7 )
8 -- -------------------------------------------------------
9 -- END OF TEST DATA JUST USE QUERY BELOW AGAINST OWN TABLE
10 -- -------------------------------------------------------
11 ,idealpath as (
12 select id, path, idpath
13 from (
14 select id, path, idpath, cmlt_diff, min_diff, cvrg, max_cvrg
15 from (
16 select x.id
17 ,x.path
18 ,idpath
19 ,to_number(y.column_value) as cmlt_diff
20 ,min(to_number(y.column_value)) over (partition by cvrg) as min_diff
21 ,cvrg
22 ,max(cvrg) over () as max_cvrg
23 from (
24 select connect_by_root(id) as id
25 ,down-connect_by_root(top) as cvrg
26 ,ltrim(sys_connect_by_path(prior down-top,'+'),'+') as cmlt_diff
27 ,ltrim(sys_connect_by_path(top||'-'||down,':'),':') as path
28 ,ltrim(sys_connect_by_path(id,':'),':') as idpath
29 from data
30 where connect_by_isleaf = 1
31 connect by nocycle top between prior top and prior down
32 and not down between prior top and prior down
33 ) x
34 ,xmltable(nvl(cmlt_diff,'0')) y
35 )
36 where cvrg = max_cvrg
37 )
38 where cmlt_diff = min_diff
39 )
40 --
41 select d.id, d.top, d.down
42 from data d
43 ,(select level l, to_number(regexp_substr(idpath,'[^:]+',1,level)) as id
44 from idealpath
45 connect by regexp_substr(idpath,'[^:]+',1,level) is not null) bp
46 where bp.id = d.id
47* order by bp.l
SQL> /
ID TOP DOWN
1 18 1602
2 19 1962
6 1683 6352 -
I need to find an Unibody 2.66GHz core i7 logic board for my MacBook Pro 15"
I need to find an Unibody 2.66GHz core i7 logic board for my MacBook Pro 15". Where can I find it?
have you searched the internet? perhaps ifixit.com might have one.
-
I need to buy a logic board for
Apple MacBook Pro 15" A1286, but i couldn´t find online to buy it where can i get one and if it´s possible if i can have it delivered to my hotelThere are a lot of MacBook Pros with the model # A1286 - which year is your model (e.g., "15-inch Late 2011")?
The only place that I know that you might could score a specific logic board is www.ifixit.com. They may be able to ship to your hotel.
Clinton -
SAP PS Module Report, Help needed for the Right Logic.
Hi,
I have to develop a PS module Report . This spec of this report is when you enter , project # , month , date , proj type it should display all the projects and only the billing levels with different fiels like ITD cost, ITD sales, ytd cost, sales, awards etc etc.
Right now Iam getting the O/P : in the following manner, There are many fields I am just showing the desired ones which have to be changed.
Proj, Title, award, ITDsales, ITD cost , ytd sales, ytd costs,
14148, New prj 123 -- --- -
14148-B01, bill1 -
234 -
456 -
14148-B02, bill2 -
789 -
123 -
14148.001 wbs1 -
123 -
456
14148.001 wbs2 -
567 -
890
But for me the desired output must be only for project and the billing levels. It shouldnt be for WBS elements xxxx.001 and xxxx.002.
Desired output:
Proj, Title, award, ITDsales, ITD cost , ytd sales, ytd costs,
14148, New prj 123 -- 690 -
1346
14148-B01, bill1 -
234 -
456 -
14148-B02, bill2 -
789 -
123 -
The ITD costs and YTD costs must be added 123 + 567 = 690 and
456+890 = 1346.
And these values must come on the project level.
P.S: I can restrict the values for wbs elements , means I can filter them at PRPS table by giving prps-stufe LE 2. Then I wont get the wbs level, But I want the values of these to be added up and then show it on the project level.
Please go through this code and let me know where exactly I need to put the right logic to work in the desired manner.
Thanks in advance
Dan
Code Below************************
[code]TABLES: PROJ, "Project Definition
PRPS, "WBS Elements
prhi,
CEPC, " Profit Center w/ Group Head info
BPGE, "Plans (12, 13, etc.)
COSP, "Primary Cost Element (Bill Sales, DPC)
COSS, "Secondary Cost Element (Shrd Sls,Sal,etc)
COSB, "Results Analysis Cost Elements (Unbil Sls)
COOI, "Commitments management: Line items
JEST, "Project Status
TCJ04, "Person Responsible for Project
zpclasses, "Project classes.
New Added
CRCO, " Assignment of Work Center to Cost Center
CRHD. " Work Center Header
Record Layout of extracted data
TYPES: BEGIN OF EXDEF, "Data definition of extract data
X_BU(2) TYPE C, "Business Unit
X_CNTR(10) TYPE C, " Profit Center
X_PROJ(24) TYPE C, "Project def (Prj)
X_CREP(30) TYPE C, "Contract Rep.
X_BDREP(25) TYPE C, "BD Rep. name
X_GRPH(15) TYPE C, "Tech Rep employee name
X_ACTREP(15) TYPE C, "Acct Rep employee name
X_PMGR(15) TYPE C, "PM employee name
X_TTLE(35) TYPE C, "Title
X_CLNT(20) TYPE C, "Client
X_POCN(20) TYPE C, "Prime Contract Number
X_TYPE(13) TYPE C, "Order Type Sarnoff
X_OPEN(10) TYPE C, "Open Date
X_CLOSE(10) TYPE C, "Close Date
X_CGT(4) TYPE C, "CO, GV, TC
X_DISTR(2) TYPE C, "Distribution Channel
X_CONTR(6) TYPE C, "Percentage contribution
X_AWRD(14) TYPE C, "Award (Plan 11)
X_P12R(14) TYPE C, "Auth Revenue (Plan 12 @ Rev)
X_P12C(14) TYPE C, "Auth Cost (Plan 12 @ Cost)
X_P13R(14) TYPE C, "Auth Revenue (Plan 13 @ Rev)
X_P13C(14) TYPE C, "Auth Cost (Plan 13 @ Cost)
X_ITDS(14) TYPE C, "ITD Sales
X_ITDC(14) TYPE C, "ITD Costs
X_YTDS(14) TYPE C, "YTD Sales
X_YTDC(14) TYPE C, "YTD Costs
X_MTHS(14) TYPE C, "Current Month Sales
X_MTHC(14) TYPE C, "Current Month Costs
X_ITDB(14) TYPE C, "ITD Billed Sales
X_YTDB(14) TYPE C, "YTD Billed Sales
X_MTHB(14) TYPE C, "Current Month Billed Sales
X_COMM(14) TYPE C, "Commitments
X_STAT(6) TYPE C, "Active or Inactive (REL, TECO, or CLSD)
X_ZPROJCLASS(12),
X_MTHIC(14) TYPE C, "Current Month Incremental Costs
X_YTDIC(14) TYPE C, "YTD Incremental Costs
X_ITDIC(14) TYPE C, "ITD Incremental Costs
X_ZSCURVE(10) TYPE C, "S-CURVE Status
New Added
X_CM_COST(20) TYPE C,
X_AM_COST(20) TYPE C,
X_TL_COST(20) TYPE C,
X_KP_COST(20) TYPE C,
X_PM_COST(20) TYPE C,
END OF EXDEF.
Data declarations
FIELD-SYMBOLS <MNT> .
DATA: ETAB TYPE EXDEF OCCURS 100 WITH HEADER LINE.
DATA: X1_PM_COST(20) TYPE C,
X1_TL_COST(20) TYPE C,
X1_AM_COST(20) TYPE C,
X1_CM_COST(20) TYPE C,
X1_KP_COST(20) TYPE C.
DATA: KOKRS_FIXED LIKE PROJ-VKOKR VALUE 'DSRC', "Controlling Area
TOTAL_AWARD LIKE BPGE-WTGES,
TOTAL_AUTHR12 LIKE BPGE-WTGES,
TOTAL_AUTHC12 LIKE BPGE-WTGES,
TOTAL_AUTHR13 LIKE BPGE-WTGES,
TOTAL_AUTHC13 LIKE BPGE-WTGES,
TOTAL_ITDSALES LIKE BPGE-WTGES,
TOTAL_ITDCOSTS LIKE BPGE-WTGES,
TOTAL_ITDICOSTS LIKE BPGE-WTGES,
TOTAL_YTDSALES LIKE BPGE-WTGES,
TOTAL_YTDCOSTS LIKE BPGE-WTGES,
TOTAL_YTDICOSTS LIKE BPGE-WTGES,
TOTAL_MTHSALES LIKE BPGE-WTGES,
TOTAL_MTHCOSTS LIKE BPGE-WTGES,
TOTAL_MTHICOSTS LIKE BPGE-WTGES,
TOTAL_ITDBILLED LIKE BPGE-WTGES,
TOTAL_YTDBILLED LIKE BPGE-WTGES,
TOTAL_MTHBILLED LIKE BPGE-WTGES,
TOTAL_COMMITMENT LIKE COOI-WTGBTR,
HOLD_PRART LIKE PRPS-PRART,
COUNT_PROJECTS TYPE I,
MNT_INDX(20) TYPE C,
HLD_INDX(3) TYPE N,
YYYY_MM(10) TYPE C,
TEMP-DATE(8) TYPE C.
Selection Screen
SELECTION-SCREEN SKIP 3.
SELECTION-SCREEN BEGIN OF BLOCK XEXTRPM WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN SKIP 2.
PARAMETERS MONTH(2) TYPE N OBLIGATORY.
PARAMETERS YEAR(4) TYPE N OBLIGATORY.
SELECT-OPTIONS: EXTRPRJ FOR PROJ-PSPID. " Range of Projects
SELECT-OPTIONS: EXTRTYP FOR PRPS-PRART. "Project Types (CO,GV,etc.*)
SELECT-OPTIONS: EXTRPCTR FOR PROJ-PRCTR. " Range of Profit centers
SELECTION-SCREEN SKIP 2.
PARAMETERS: OPT1 RADIOBUTTON GROUP OPTN,
OPT2 RADIOBUTTON GROUP OPTN DEFAULT 'X'.
select-options : s_pc for proj-zprojclass. "project class
SELECTION-SCREEN END OF BLOCK XEXTRPM.
Select Tables
START-OF-SELECTION.
write: / 'Sales data (Unshared) extracted on: ', sy-datum.
uline.
CLEAR: COUNT_PROJECTS,
TOTAL_AWARD,
TOTAL_AUTHR12,
TOTAL_AUTHC12,
TOTAL_AUTHR13,
TOTAL_AUTHC13,
TOTAL_ITDSALES,
TOTAL_ITDCOSTS,
TOTAL_YTDSALES,
TOTAL_YTDCOSTS,
TOTAL_MTHSALES,
TOTAL_MTHCOSTS,
TOTAL_ITDBILLED,
TOTAL_YTDBILLED,
TOTAL_MTHBILLED,
TOTAL_COMMITMENT,
ETAB.
PROJ Table Project Definition
SELECT * FROM PROJ "Project Definition
WHERE PSPID IN EXTRPRJ AND " Range of Project Numbers
PRCTR IN EXTRPCTR and " Range of Profit center
zprojclass in s_pc. "project class
SELECT * FROM PRPS WHERE "WBS Elements
PRART IN EXTRTYP " Range of Proj.Types (CO,GV,TC..
and PSPHI = PROJ-PSPNR.
HOLD_PRART = ' '. "clears project type
CLEAR ETAB.
ETAB-X_PROJ = PRPS-POSID.
ETAB-X_BU = PRPS-PRCTR(2). "Business Unit
ETAB-X_PMGR = PROJ-VERNA. "Project Manager
IF PRPS-PRCTR(2) = '01'.
ETAB-X_CNTR = PRPS-PRCTR. " Profit Center
CONCATENATE SPACE PRPS-PRCTR INTO ETAB-X_CNTR SEPARATED BY SPACE.
ELSE.
ETAB-X_CNTR = PRPS-PRCTR. " Profit Center
ENDIF.
ETAB-X_TTLE = PRPS-POST1. "Title
CLEAR TEMP-DATE.
TEMP-DATE = PROJ-PLFAZ. "Project planned start date
CONCATENATE TEMP-DATE4(2) '/' TEMP-DATE6(2) '/'
TEMP-DATE+0(4) INTO ETAB-X_OPEN.
TEMP-DATE = PROJ-PLSEZ. "Project planned finish date
CONCATENATE TEMP-DATE4(2) '/' TEMP-DATE6(2) '/'
TEMP-DATE+0(4) INTO ETAB-X_CLOSE.
Tech Lead
will comment below
SELECT SINGLE VERNA FROM TCJ04 "Tech Lead name from TCJ04
INTO (ETAB-X_GRPH) WHERE VERNR = PROJ-ZGRPHD.
End Of Tech Lead
Account Manager
SELECT SINGLE VERNA FROM TCJ04 "Acct Manager from TCJ04
INTO (ETAB-X_BDREP) WHERE VERNR = PROJ-ZBUSDEV.
******End Of Account Manager
Key Personnel
SELECT SINGLE VERNA FROM TCJ04 "Account Rep name from TCJ04
INTO (ETAB-X_ACTREP) WHERE VERNR = PROJ-ZRESPDIR.
********End of Key Personnel
**Contract Manager
SELECT SINGLE VERNA FROM TCJ04 "Contract Rep name from TCJ04
INTO (ETAB-X_CREP) WHERE VERNR = PROJ-ZCNTREP.
End of Contract Manager
PRPS Table WBS's attached to the Project
SELECT * FROM PRPS WHERE "WBS Elements
PRART IN EXTRTYP "Range of Proj.Types (CO,GV,TC..
AND PSPHI = PROJ-PSPNR.
order by posid stufe. "Sort by WBS & Level (needed?)
get info from level 1 of the WBS
IF PRPS-STUFE EQ 1. "top-level WBS element
HOLD_PRART = PRPS-PRART. "save project type for later
ETAB-X_STAT = '????'. "set ? as the default status
get Status for level 1
SELECT * FROM JEST "use JEST to determine Status
WHERE OBJNR = PRPS-OBJNR
AND INACT EQ SPACE. "space denotes an active status
CASE JEST-STAT. "find the system status (Ixxx)
WHEN 'I0001'.
ETAB-X_STAT = 'CRTD'. "Created
WHEN 'I0002'.
ETAB-X_STAT = 'REL'. "Released
WHEN 'I0045'.
ETAB-X_STAT = 'TECO'. "Technically Complete
WHEN 'I0046'.
ETAB-X_STAT = 'CLSD'. "Closed
ENDCASE.
ENDSELECT.
Select only active projects (ie; those not with TECO or CLSD)
IF OPT2 EQ 'X'
AND ( ETAB-X_STAT EQ 'TECO'
OR ETAB-X_STAT EQ 'CLSD' ).
EXIT.
ENDIF.
*comment Contract Rep and Proj man because we get them from PROJ now
etab-x_crep = prps-zzcont. "Contract Rep.
etab-x_pmgr = prps-verna. "Program Manager Name
ETAB-X_CLNT = PRPS-ZZMANDT. "Client Name
ETAB-X_CGT = PRPS-PRART. "CO, GV, TC, etc
ETAB-X_DISTR = PRPS-ZZVTWEG. "Distrib Channel (ie; GP, etc.)
ETAB-X_CONTR = PRPS-USR04. "Contribution %
ETAB-X_POCN = PRPS-ZZPOCN. "Contract Number
ETAB-X_TYPE = PRPS-ZZORDT. "Order Type Sarnoff
Award and Authorization (Revenue & Cost)
SELECT * FROM BPGE
WHERE OBJNR = PRPS-OBJNR
AND LEDNR = '0001' "Budget / Planning Ledger
AND TRGKZ = 'N' "Object indicator
AND WRTTP = '01' "Value Type
AND ( VERSN = '011' "011 = Award
OR VERSN = '012' "012 = Billing Authorization
OR VERSN = '013' ). "013 = RA Authorization
"010 = Funding Authorization
Award Plan 11
IF BPGE-VERSN = '011'. "Plan 11 = Award
CASE BPGE-VORGA.
WHEN 'KSTP'. "KSTP = Cost level
ETAB-X_AWRD = ETAB-X_AWRD + BPGE-WTGES.
ENDCASE.
ENDIF.
IF prps-stufe eq '2'.
Authorization (Revenue & Cost plan 12) Plan 12
IF BPGE-VERSN = '012'. "Plan 12 = RA Authorization
CASE BPGE-VORGA.
WHEN 'KSTR'. "KSTR = Revenue level
ETAB-X_P12R = ETAB-X_P12R - BPGE-WTGES.
WHEN 'KSTP'. "KSTP = Cost level
ETAB-X_P12C = ETAB-X_P12C + BPGE-WTGES.
ENDCASE.
ENDIF.
Authorization (Revenue & Cost plan 13) Plan 13
IF BPGE-VERSN = '013'. "Plan 13 = RA Authorization
CASE BPGE-VORGA.
WHEN 'KSTR'. "KSTR = Revenue level
ETAB-X_P13R = ETAB-X_P13R - BPGE-WTGES.
WHEN 'KSTP'. "KSTP = Cost level
ETAB-X_P13C = ETAB-X_P13C + BPGE-WTGES.
ENDCASE.
ENDIF.
endif.
ENDSELECT. "BPGE
ENDIF. "end of if prps-stufe eq 1. top-level WBS element
COSP Table (External Postings) Awards
COSP Table (External Postings) Billed Sales
COSP Table (External Postings) DPC's & Legacy Load
SELECT * FROM COSP
WHERE OBJNR = PRPS-OBJNR AND
GJAHR LE YEAR
AND (
( kstar = '0000400999' and "old CE for Award $
( KSTAR BETWEEN '0000400990' AND '0000400999' AND
VERSN = '011' AND "11 = Award
WRTTP = '01' ) "01 = Planned
OR ( ( KSTAR BETWEEN '0000400001' AND '0000400989' OR
KSTAR BETWEEN '0000999001' AND '0000999003' ) AND
WRTTP = '04' ) "04 = Actuals
OR ( ( KSTAR BETWEEN '0000998001' AND '0000998010' OR
KSTAR BETWEEN '0000600001' AND '0000601999' ) AND
WRTTP = '04' ) "04 = Actuals
*------- Awards
if cosp-kstar = '0000400999' and "old 400999 = Awards
IF COSP-KSTAR BETWEEN '0000400990' AND '0000400999' AND
COSP-VERSN = '011' AND "11 = Award
COSP-WRTTP = '01'. "01 = Planned
IF YEAR = COSP-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSP-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_AWRD = ETAB-X_AWRD + <MNT>.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSP-GJAHR.
ETAB-X_AWRD = ETAB-X_AWRD +
COSP-WKG001 + COSP-WKG002 +
COSP-WKG003 + COSP-WKG004 +
COSP-WKG005 + COSP-WKG006 +
COSP-WKG007 + COSP-WKG008 +
COSP-WKG009 + COSP-WKG010 +
COSP-WKG011 + COSP-WKG012 +
COSP-WKG013 + COSP-WKG014 +
COSP-WKG015 + COSP-WKG016.
ELSE.
EXIT.
ENDIF.
ENDIF.
*------- Billed Sales
IF ( COSP-KSTAR BETWEEN '0000400001' AND '0000400989' OR
COSP-KSTAR BETWEEN '0000999001' AND '0000999003' ) AND
COSP-WRTTP = '04'.
"0000999001 = ITD Sales
"0000999003 = ITD Billed Revenue
IF YEAR = COSP-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSP-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_ITDB = ETAB-X_ITDB - <MNT>.
ETAB-X_YTDB = ETAB-X_YTDB - <MNT>.
IF SY-INDEX = MONTH.
ETAB-X_MTHB = ETAB-X_MTHB - <MNT>.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSP-GJAHR.
ETAB-X_ITDB = ETAB-X_ITDB -
COSP-WKG001 - COSP-WKG002 -
COSP-WKG003 - COSP-WKG004 -
COSP-WKG005 - COSP-WKG006 -
COSP-WKG007 - COSP-WKG008 -
COSP-WKG009 - COSP-WKG010 -
COSP-WKG011 - COSP-WKG012 -
COSP-WKG013 - COSP-WKG014 -
COSP-WKG015 - COSP-WKG016.
ELSE.
EXIT.
ENDIF.
ENDIF.
*------- DPC's & Legacy Load
IF ( COSP-KSTAR BETWEEN '0000998001' AND '0000998010' OR
COSP-KSTAR BETWEEN '0000600001' AND '0000601999' ) AND
COSP-WRTTP = '04'.
IF YEAR = COSP-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSP-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_ITDC = ETAB-X_ITDC + <MNT>.
ETAB-X_YTDC = ETAB-X_YTDC + <MNT>.
IF SY-INDEX = MONTH.
ETAB-X_MTHC = ETAB-X_MTHC + <MNT>.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSP-GJAHR.
ETAB-X_ITDC = ETAB-X_ITDC +
COSP-WKG001 + COSP-WKG002 +
COSP-WKG003 + COSP-WKG004 +
COSP-WKG005 + COSP-WKG006 +
COSP-WKG007 + COSP-WKG008 +
COSP-WKG009 + COSP-WKG010 +
COSP-WKG011 + COSP-WKG012 +
COSP-WKG013 + COSP-WKG014 +
COSP-WKG015 + COSP-WKG016.
ELSE.
EXIT.
ENDIF.
ENDIF.
ENDSELECT.
COOI Table (Commitments) commitments for the WBS elements
SELECT * FROM COOI
WHERE OBJNR = PRPS-OBJNR.
ETAB-X_COMM = ETAB-X_COMM + COOI-WTGBTR.
ENDSELECT.
COSS Table (External Postings) G&A on Commitments
COSS Table (External Postings) Shared Billed Sales
COSS Table (External Postings) Shared DPC's
COSS Table (External Postings) Salary,ESE,OH, & G&A
SELECT * FROM COSS
WHERE
( OBJNR = PRPS-OBJNR AND
WRTTP = '22' ) "G&A on Commitments
OR
( OBJNR = PRPS-OBJNR AND
GJAHR LE YEAR AND
WRTTP = '04' AND "04 = Actuals
( "Shared Billed Sales
( KSTAR BETWEEN '0000400001' AND '0000400989' OR
KSTAR BETWEEN '0000999001' AND '0000999003' )
OR "Shared DPC's
( KSTAR BETWEEN '0000600001' AND '0000601999' )
OR "Salary,ESE,OH, & G&A
( ( KSTAR BETWEEN '0000001000' AND '0000001999' OR
KSTAR BETWEEN '0000002100' AND '0000002199' OR
KSTAR BETWEEN '0000002500' AND '0000002599' OR
KSTAR BETWEEN '0000002800' AND '0000002899' ) )
and parob not like 'PR%' ) "commented out on 4/19/2000
*------- G&A on Commitments (NOTE: data is always as of the RUN date)
IF COSS-WRTTP = '22'.
ETAB-X_COMM = ETAB-X_COMM +
COSS-WKG001 + COSS-WKG002 +
COSS-WKG003 + COSS-WKG004 +
COSS-WKG005 + COSS-WKG006 +
COSS-WKG007 + COSS-WKG008 +
COSS-WKG009 + COSS-WKG010 +
COSS-WKG011 + COSS-WKG012 +
COSS-WKG013 + COSS-WKG014 +
COSS-WKG015 + COSS-WKG016.
ENDIF.
*------- Shared Billed Sales
IF ( COSS-KSTAR BETWEEN '0000400001' AND '0000400989' OR
COSS-KSTAR BETWEEN '0000999001' AND '0000999003' ) AND
COSS-WRTTP = '04'.
IF YEAR = COSS-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSS-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_ITDB = ETAB-X_ITDB - <MNT>.
ETAB-X_YTDB = ETAB-X_YTDB - <MNT>.
IF SY-INDEX = MONTH.
ETAB-X_MTHB = ETAB-X_MTHB - <MNT>.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSS-GJAHR.
ETAB-X_ITDB = ETAB-X_ITDB -
COSS-WKG001 - COSS-WKG002 -
COSS-WKG003 - COSS-WKG004 -
COSS-WKG005 - COSS-WKG006 -
COSS-WKG007 - COSS-WKG008 -
COSS-WKG009 - COSS-WKG010 -
COSS-WKG011 - COSS-WKG012 -
COSS-WKG013 - COSS-WKG014 -
COSS-WKG015 - COSS-WKG016.
ELSE.
EXIT.
ENDIF.
ENDIF.
*------- Shared DPC's
IF COSS-KSTAR BETWEEN '0000600001' AND '0000601999' AND
COSS-WRTTP = '04'.
IF YEAR = COSS-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSS-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_ITDC = ETAB-X_ITDC + <MNT>.
ETAB-X_YTDC = ETAB-X_YTDC + <MNT>.
IF SY-INDEX = MONTH.
ETAB-X_MTHC = ETAB-X_MTHC + <MNT>.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSS-GJAHR.
ETAB-X_ITDC = ETAB-X_ITDC +
COSS-WKG001 + COSS-WKG002 +
COSS-WKG003 + COSS-WKG004 +
COSS-WKG005 + COSS-WKG006 +
COSS-WKG007 + COSS-WKG008 +
COSS-WKG009 + COSS-WKG010 +
COSS-WKG011 + COSS-WKG012 +
COSS-WKG013 + COSS-WKG014 +
COSS-WKG015 + COSS-WKG016.
ELSE.
EXIT.
ENDIF.
ENDIF.
*------- Salary,ESE,OH,& G&A
IF ( COSS-KSTAR BETWEEN '0000001000' AND '0000001999' OR
COSS-KSTAR BETWEEN '0000002100' AND '0000002199' OR
COSS-KSTAR BETWEEN '0000002500' AND '0000002599' OR
COSS-KSTAR BETWEEN '0000002800' AND '0000002899' ) AND
COSS-WRTTP = '04'.
IF YEAR = COSS-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSS-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_ITDC = ETAB-X_ITDC + <MNT>.
ETAB-X_YTDC = ETAB-X_YTDC + <MNT>.
IF SY-INDEX = MONTH.
ETAB-X_MTHC = ETAB-X_MTHC + <MNT>.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSS-GJAHR.
ETAB-X_ITDC = ETAB-X_ITDC +
COSS-WKG001 + COSS-WKG002 +
COSS-WKG003 + COSS-WKG004 +
COSS-WKG005 + COSS-WKG006 +
COSS-WKG007 + COSS-WKG008 +
COSS-WKG009 + COSS-WKG010 +
COSS-WKG011 + COSS-WKG012 +
COSS-WKG013 + COSS-WKG014 +
COSS-WKG015 + COSS-WKG016.
ELSE.
EXIT.
ENDIF.
ENDIF.
ENDSELECT.
COSB Table (Results from running RA) Unbilled Sales
SELECT * FROM COSB
WHERE OBJNR = PRPS-OBJNR
AND KSTAR BETWEEN '0000003004' AND '0000003005'
"0000003004 = Unbilled Revenue
"0000003005 = Unearned Revenue
AND GJAHR LE YEAR
AND WRTTP = '32'. "32 = Results Analysis
IF YEAR = COSB-GJAHR.
DO.
IF SY-INDEX LE MONTH.
MOVE SY-INDEX TO HLD_INDX.
MNT_INDX = 'COSB-WKGXXX'.
REPLACE 'XXX' WITH HLD_INDX INTO MNT_INDX.
ASSIGN (MNT_INDX) TO <MNT>.
ETAB-X_ITDS = ETAB-X_ITDS - <MNT>.
ETAB-X_YTDS = ETAB-X_YTDS - <MNT>.
IF SY-INDEX = MONTH.
ETAB-X_MTHS = ETAB-X_MTHS - <MNT>.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ELSEIF YEAR > COSB-GJAHR.
ETAB-X_ITDS = ETAB-X_ITDS -
COSB-WKG001 - COSB-WKG002 -
COSB-WKG003 - COSB-WKG004 -
COSB-WKG005 - COSB-WKG006 -
COSB-WKG007 - COSB-WKG008 -
COSB-WKG009 - COSB-WKG010 -
COSB-WKG011 - COSB-WKG012 -
COSB-WKG013 - COSB-WKG014 -
COSB-WKG015 - COSB-WKG016.
ELSE.
EXIT.
ENDIF.
ENDSELECT.
ENDSELECT. "End of WBS records (from PRPS) for project
Get Total Sales by adding Billed Sales to Unbilled Sales.
ETAB-X_ITDS = ETAB-X_ITDS + ETAB-X_ITDB.
ETAB-X_YTDS = ETAB-X_YTDS + ETAB-X_YTDB.
ETAB-X_MTHS = ETAB-X_MTHS + ETAB-X_MTHB.
IF HOLD_PRART IN EXTRTYP. "Matches the user requested project type
IF OPT1 EQ 'X' OR "All projects
( OPT2 EQ 'X' AND "Only active projects
ETAB-X_STAT NE 'TECO' AND
ETAB-X_STAT NE 'CLSD' ).
TOTAL_AWARD = TOTAL_AWARD + ETAB-X_AWRD.
TOTAL_AUTHR12 = TOTAL_AUTHR12 + ETAB-X_P12R .
TOTAL_AUTHC12 = TOTAL_AUTHC12 + ETAB-X_P12C.
TOTAL_AUTHR13 = TOTAL_AUTHR13 + ETAB-X_P13R.
TOTAL_AUTHC13 = TOTAL_AUTHC13 + ETAB-X_P13C.
TOTAL_ITDSALES = TOTAL_ITDSALES + ETAB-X_ITDS.
TOTAL_ITDCOSTS = TOTAL_ITDCOSTS + ETAB-X_ITDC.
TOTAL_YTDSALES = TOTAL_YTDSALES + ETAB-X_YTDS.
TOTAL_YTDCOSTS = TOTAL_YTDCOSTS + ETAB-X_YTDC.
TOTAL_MTHSALES = TOTAL_MTHSALES + ETAB-X_MTHS.
TOTAL_MTHCOSTS = TOTAL_MTHCOSTS + ETAB-X_MTHC.
TOTAL_ITDBILLED = TOTAL_ITDBILLED + ETAB-X_ITDB.
TOTAL_YTDBILLED = TOTAL_YTDBILLED + ETAB-X_YTDB.
TOTAL_MTHBILLED = TOTAL_MTHBILLED + ETAB-X_MTHB.
TOTAL_COMMITMENT = TOTAL_COMMITMENT + ETAB-X_COMM.
PERFORM SHIFT_SIGN.
APPEND ETAB. "Write data to internal table
CLEAR ETAB.
COUNT_PROJECTS = COUNT_PROJECTS + 1. "Count # of Projects
ENDIF.
ENDIF.
ENDSELECT.
ENDSELECT. "End of Projects from PROJ table
PERFORM GRAND_TOTALS.
SORT ETAB BY X_BU X_PROJ.
ETAB-X_BU = 'BU'.
ETAB-X_CNTR = 'PrftCntr'.
ETAB-X_PROJ = 'Proj'.
ETAB-X_CREP = 'Contract Mgr'.
ETAB-X_BDREP = 'Account Mgr'.
ETAB-X_GRPH = 'Technical Lead'.
ETAB-X_ACTREP = 'Key Person1'.
ETAB-X_PMGR = 'Program Mgr'.
ETAB-X_TTLE = 'Title'.
ETAB-X_CLNT = 'Client'.
ETAB-X_POCN = 'Contract #'.
ETAB-X_TYPE = 'Type'.
ETAB-X_OPEN = 'Open'.
ETAB-X_CLOSE = 'Close'.
ETAB-X_CGT = 'CGT'.
ETAB-X_DISTR = 'DC'.
ETAB-X_CONTR = 'Contr%'.
ETAB-X_AWRD = 'Award'.
ETAB-X_P12R = 'Auth12 Sales'.
ETAB-X_P12C = 'Auth12 Cost'.
ETAB-X_P13R = 'Auth13 Sales'.
ETAB-X_P13C = 'Auth13 Cost'.
ETAB-X_ITDS = 'ITD Sales'.
ETAB-X_ITDC = 'ITD Costs'.
ETAB-X_YTDS = 'YTD Sales'.
ETAB-X_YTDC = 'YTD Costs'.
ETAB-X_MTHS = 'Mth Sales'.
ETAB-X_MTHC = 'Mth Costs'.
ETAB-X_ITDB = 'ITD Billed'.
ETAB-X_YTDB = 'YTD Billed'.
ETAB-X_MTHB = 'Mth Billed'.
ETAB-X_COMM = 'Commitments'.
ETAB-X_STAT = 'Status'.
INSERT ETAB INDEX 1. "Write a report header line to internal table
CLEAR ETAB.
CALL FUNCTION 'Z_RH_START_EXCEL_DATA_OLE'
EXPORTING
data_name = 'C:\WINNT\Profiles\cbraswell\Desktop\TestTemp.xlt'
DATA_NAME = 'ZSales.XLS'
DATA_PATH_FLAG = 'W'
DATA_TYPE = 'DAT'
DATA_BIN_FILE_SIZE = 'ZSales'
CHART_TITLE = 'ZSales'
CHART_TYPE = 2
CATEGORY_TITLE = 'ZSales'
VALUE_TITLE = 'ZSales'
DATA_XTOP_COR = 0
DATA_YTOP_COR = 0
DATA_XBOT_COR = 0
DATA_YBOT_COR = 0
CATEGORY_XTOP_COR = 0
CATEGORY_YTOP_COR = 0
CATEGORY_XBOT_COR = 0
CATEGORY_YBOT_COR = 0
TABLES
DATA_TAB = ETAB
EXCEPTIONS
NO_BATCH = 1
DOWNLOAD_ERROR = 2
INVALID_TYPE = 3
INTERNAL_ERROR = 4
NO_OLE_SUPPORT = 5
OLE_FILE_ERROR = 6
OLE_ERROR = 7
NO_DATA = 8
COORDINATE_ERROR = 9
OTHERS = 10.
Negative # sign in the front of number for downloading to Excel
FORM SHIFT_SIGN.
IF ETAB-X_AWRD CA '-'. SHIFT ETAB-X_AWRD RIGHT CIRCULAR. ENDIF.
IF ETAB-X_P12R CA '-'. SHIFT ETAB-X_P12R RIGHT CIRCULAR. ENDIF.
IF ETAB-X_P12C CA '-'. SHIFT ETAB-X_P12C RIGHT CIRCULAR. ENDIF.
IF ETAB-X_P13R CA '-'. SHIFT ETAB-X_P13R RIGHT CIRCULAR. ENDIF.
IF ETAB-X_P13C CA '-'. SHIFT ETAB-X_P13C RIGHT CIRCULAR. ENDIF.
IF ETAB-X_ITDS CA '-'. SHIFT ETAB-X_ITDS RIGHT CIRCULAR. ENDIF.
IF ETAB-X_ITDIC CA '-'. SHIFT ETAB-X_ITDIC RIGHT CIRCULAR. ENDIF.
IF ETAB-X_ITDC CA '-'. SHIFT ETAB-X_ITDC RIGHT CIRCULAR. ENDIF.
IF ETAB-X_YTDS CA '-'. SHIFT ETAB-X_YTDS RIGHT CIRCULAR. ENDIF.
IF ETAB-X_YTDC CA '-'. SHIFT ETAB-X_YTDC RIGHT CIRCULAR. ENDIF.
IF ETAB-X_YTDIC CA '-'. SHIFT ETAB-X_YTDIC RIGHT CIRCULAR. ENDIF.
IF ETAB-X_MTHS CA '-'. SHIFT ETAB-X_MTHS RIGHT CIRCULAR. ENDIF.
IF ETAB-X_MTHC CA '-'. SHIFT ETAB-X_MTHC RIGHT CIRCULAR. ENDIF.
IF ETAB-X_MTHIC CA '-'. SHIFT ETAB-X_MTHIC RIGHT CIRCULAR. ENDIF.
IF ETAB-X_ITDB CA '-'. SHIFT ETAB-X_ITDB RIGHT CIRCULAR. ENDIF.
IF ETAB-X_YTDB CA '-'. SHIFT ETAB-X_YTDB RIGHT CIRCULAR. ENDIF.
IF ETAB-X_MTHB CA '-'. SHIFT ETAB-X_MTHB RIGHT CIRCULAR. ENDIF.
IF ETAB-X_COMM CA '-'. SHIFT ETAB-X_COMM RIGHT CIRCULAR. ENDIF.
ENDFORM.
FORM GRAND_TOTALS.
SKIP 1. .
WRITE: / '----
WRITE: / 'System ID = ', SY-SYSID,
/ 'Client = ', SY-MANDT,
/ 'User = ', SY-UNAME,
/ 'Date of data extract = ', SY-DATUM ,
/ 'Number of Projects = ', COUNT_PROJECTS,
/ 'total Award (Plan 11) = ', TOTAL_AWARD,
/ 'total Auth SalesHi all,
Iam really waiting for someone to see and get the logic right for this code.Iam completely stuck up. i need ur help
Thanks -
Urgent,need for code in bdc for co02
hi all,
im in urgent need of code for developing bdc tcode co02.
Thanks for your help..1. Please record the transaction which you need to change the data in Co02 (Shop Order/Prod. Order)
2. Create BDC program as normally you do it for normal BDC programs..
Smaple Code with Recording.
clear: bdcdata,messtab.
perform bdc_dynpro using: 'SAPLCOKO1' '0110'.
perform bdc_field using: 'CAUFVD-AUFNR' t_aufk-aufnr.
perform bdc_field using: 'R62CLORD-FLG_OVIEW' 'X'.
perform bdc_field using: 'BDC_OKCODE' '/00'.
perform bdc_dynpro using: 'SAPLCOKO1' '0115'.
perform bdc_field using: 'BDC_SUBSCR' 'SAPLCOKO1'.
perform bdc_field using: 'BDC_OKCODE' '=KOWE'.
perform bdc_dynpro using: 'SAPLCOKO1' '0115'.
perform bdc_field using: 'BDC_SUBSCR' 'SAPLCOKO1'.
perform bdc_field using: 'BDC_CURSOR' 'AFPOD-INSMK'.
perform bdc_field using: 'AFPOD-INSMK' 'S'.
perform bdc_field using: 'BDC_OKCODE' '=BU'.
call transaction 'CO02' using bdcdata mode 'A'
update 'S'
messages into messtab.
Thanks, -
Hi everyone ☺
I’m finally planning to start recording what I play, and after some hours of wandering on the web I found some interesting possibilities. Now what I need is to decide which one is more suitable for my needs, and here comes the moment for apple discussions
Basically, I will record my own music one track/instrument at a time (I’m still not able to play more than one…and I dont’ want to spend 2.000$ to buy a 24-ins device just to record drum tracks), I’d like to have a software with built-in effects for guitar/bass/voice, integrated soundtrack possibilities (to play with video recordings), mixing options for both stereo and surround mixing, and I don’t want any card to be placed into my mac. Well, and obviously the sound quality must be pro-like…as anyone probably wants.
So, here’s what I came up with:
a) getting logic pro studio 8 and apogee duet
b) getting pro tools m-powered and mbox 2
c) getting one of the two softwares and a Monster iStudioLink Instrument cable and plug instruments directly into the mac
Now, the questions are:
if I can plug an instrument directly into my mac and control all parameters via one of the two softwares, what do tools like duet and mbox2 serve for?
In the case this tools are useful [ ☺ ], why ☺ … and which is the couple software/hardware that can best suit my needs?
I assume that every software has a proprietary file extension in which audio tracks are saved, so that it should be impossible to record an audio track with one software and edit it with another that has different functions/plugins (ex. from logic to pro tools, from pro tools to cakewalk sonar which I have on a pc etc.). Am I right, or is there any “standard”, non compressed high quality file type in which track can be saved and exported to be edited with different softwares?
I know that from this post it may easily seem that I’m a hopeless digital idiot, but I swear the situation is not really that bad so no need for the kind of explanations with drawings like the ones you find in the “for dummies” guides lol so every experts’ advice will be greatly appreciated
NeptuneThank you Bee Jay and Pancenter for the lighting-fast and useful answers
now I am aware that an interface IS NEEDED lol (that means they are not produced without a reasons, are they?). I know Pro Tools is the industry standard but I don't like anyone/anything to tie me to their choices/interests (so that's why I was asking about Pro Tools, knowing that there's some sort of "hardware threat"). What I look for is just quality and if I understood what you both mean, as far as this aspect is concerned, Logic and Pro Tools are substantially comparable...isn't it? On the interfaces side, I already checked the Saffire ones (they seem quite good, and cross-platform use is definitely a plus), I will check the others mentioned and will let you know In fact, I didn't consider the "platform problem" but, as I wrote, I also own a PC with an Audigy 2 soundcard (midi/analog/optical/digital inputs/outputs and firewire port...not Madonna's private studio, but not as sad as Mac's little hole) and Sonar 6 Producer Edition, so that has been a really good point to ponder. And now, in the middle of this software/hardware battle...any personal suggestions based on tests/personal experience? -
Help needed for dynamic update form
I could really use some advice - I've been asked to build a time tracking application (basically a timesheet) and I have a fair bit done but the part I am really struggling with is the best way to accommodate some of the specifications. I am NOT a programmer (I have some coldfusion experience but nothing really advanced) so I have not managed to sucessfully integrate the various methods I've found on the web so far. The database is created and so are all the queries, and I have also written a cfc to handle the drop-down menu logic needed but I don't really know how to integrate it with the form.
Our production server has ColdFusion MX7 so all the great functionality in the CF8 examples I can't use.
The issue is the user should ideally be able to add/edit/delete multiple rows at once- I like CFGRID, and the HTML version seems best. The main issue with the Flash version is the scrolling to get to the insert/delete buttons- I couldn't see how to get rid of that. A separate add and edit form could be ok depending on how easy it is to use.
One problem I have is that I can't work out how to have default values with the grid (the userID which is a session variable, and the date which is constantly changing- there is a cfcalendar for the user to change date).
The biggest hurdle is the related select drop-downs I need- it's not quite as simple as the city,state,postcode examples. For the first drop down the pick an option- and for only 2 of those options there is a second drop-down. Anything else and it stops there. For the second drop-down, there are 2 options, and depending on which one of these they pick the 3rd drop-down pulls a query from one or another table in the database (2 entirely different things). The three options have different database tables. The main timesheet table just stores the id number from those tables (so I also need to display the names on the drop-down from the options tables not the number).
I played with simple and complicated javascript and coldfusion solutions as well, but because it's a form to update records and also because of the above specs I just couldn't get anything to work right. I tried binding with the cfc and nothing would bind, plus I don't know how to make all happen without a page reload.
Does anyone have any advice for the best approach to this? As I mentioned I've got tables, queries and even a cfc but I'm not too clear on how to put it all together properly within the constraints of MX7.
PS I also can't post a lot of code because of where I work- I know that's not helpful but am looking for the best approach to this, then I can work on the details. Right now I am jumping from solution to solution and not getting anywhere.Well, a lot of code has come and gone because I couldn't make it work, where I'm currently at is:
<cfform name="updateform" id="updateform" action="#CurrentPage#?#CGI.QUERY_STRING#">
<cfgrid name="MainData" height="400" insertbutton="add" deletebutton="remove" query="getMainData" insert="yes" delete="yes" rowheight="20" selectmode="edit" format="html">
<cfgridcolumn name="id" display="no">
<cfgridcolumn name="userID" display="no">
<cfgridcolumn name="entrydate" display="no">
<cfgridcolumn name="activityID" >
<cfgridcolumn name="typeID">
<cfgridcolumn name="projectID" values="#ValueList(getProjects.id)#" valuesdisplay="#ValueList(getProjects.name)#">
<cfgridcolumn name="time" width="10">
<cfgridcolumn name="comment" width="150">
</cfgrid>
<cfinput type="hidden" name="entrydate" value="#Session.username#">
<cfinput type="hidden" name="entrydate" value="#editdate#">
<cfinput name="update" type="Submit" value="Update">
</cfform>
** for some reason getProjects.name doesn't work and causes an error. I haven't worked out how to get the default inputs for the date and user ID to work either. I also tried binding and a flash form somewhere along the way.
** the CFC is below, #ds# didn't work and I had to put in the actual DSN name, not sure why, but anyway this is the logic of the thing. Ideally I would like to use this logic with the cfgrid, but I'm not sure if that is possible? It seems like it would be the most user friendly approach.
The CFC so far is:
<cfcomponent>
<cffunction name="getActivities" access="remote" returnType="query">
<cfquery name="getActivities" datasource="#ds#">
SELECT * FROM timesheet_activities
</cfquery>
<cfreturn getActivities>
</cffunction>
<cffunction name="getTypes" access="remote" returnType="query">
<cfargument name="Activity" type="any" required="true">
<cfif ARGUMENTS.Activity EQ "">
<cfset getType = "">
<cfelse>
<cfquery name="getTypes" datasource="#ds#">
SELECT * FROM timesheet_type
</cfquery>
</cfif>
<cfreturn getTypes>
</cffunction>
<cffunction name="GetProjects" access="remote" returnType="query">
<cfargument name="Activity" type="any" required="true">
<cfargument name="Type" type="any" required="true">
<cfif ARGUMENTS.Activity EQ "" OR ARGUMENTS.Type EQ "">
<cfset LstProjects = "">
<cfelseif ARGUMENTS.Activity EQ "1" OR "3">
<cfquery name="getProjects" datasource="#ds#">
SELECT id,name FROM projectsa
WHERE completed = 'false'
</cfquery>
<cfelse>
<cfquery name="getEProjects" datasource="#dse#">
SELECT id,name FROM projectsb
WHERE statusID = '6'
</cfquery>
</cfif>
<cfreturn getProjects>
</cffunction>
</cfcomponent>
Any attempts to actually use the cfc didn't work. I tried to use it with a normal html update form and got the message- failed to bind, Activity didn't exist. I also tried to bind it to a flash grid. The argument for Activity needs to come from the drop-down Activity type selected. Maybe I'm missing something.
ETA:
just moved everything to the live MX7 server (because my dev server is Coldfusion8) and I get the following:
Attribute validation error for tag CFGRID. The tag does not allow the attribute(s) BINDONLOAD,BIND.
Does this mean I definitely can't use the CFC with the cfgrid on MX7? Or is there a way to do it?
Any advice would be greatly appreciated.
Maybe you are looking for
-
What is sync music (my iPod 4) in iTunes is it delete all my song on my iPod or is it copy my song´s from my iPod to my itunes? And how can i copy my song´s from my iPod to my iTunes?
-
I need to create an application in Portal that takes in user input, validates the input and, if valid, directs the user to another portlet. Something like this: if form(portlet)1 valid then go to form(portlet)2. if form(portlet)2 is valid then go to
-
Strange result of SimpleDateFormat.parse()
Hi, I'm having trouble with the parse data function as it does not return the correct hour. Here is what I'm doing: Date nullDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").parse("1900-01-01T00:00:00-0000");I would now expect nullDate to be Mon
-
Every time I quit Dreamweaver I get a crash report
Every time I quit Dreamweaver I get a crash report. The crash dialogue comes up saying Dreamweaver has unexpectedly quit and asks if I want to report it. I'm on a Mac using the latest version of Snow Leopard and Dreamweaver CS4. Any ideas? --Kenoli
-
Adobe 8 vs. 9 on merging PDFs
The task is to merge PDF x into PDF y, such that PDF y ends up with both its original content and with that of PDF x. When a co-workder does it with Adobe 8, it works. When I do it in Adobe 9, it doesn't work: in fact, PDF y disappears. Any one know