If - elseif end if condition
Hi i have a situation where I have display a field in my rtf like this
if (inv_trx_type feild)= 'Regular' then (REGULAR_DESCRIPTION feild)
else if (inv_trx_type feild)= 'Training' then Training_DESCRIPTION feild)
else if (inv_trx_type feild)= 'Contract' then contract_DESCRIPTION feild)
else DESCRIPTION feild
end if.
I am kind of new to XML coding. Can any body please help me out.
Please go through XMLP User Guide page 2/57 Conditional Formatting.
Similar Messages
-
Error "AND, OR or end of condition expected" in sap script IF statement
Hi all,
/: IF &WA_BSEG_IN-BUKRS& EQ '1000' OR &WA_BSEG_IN-BUKRS& EQ'2000'
= OR &WA_BSEG_IN-BUKRS& EQ '4000' OR &WA_BSEG_IN-BUKRS& EQ '5000'
/: CASE &WA_BSEG_IN-BLART&
/: WHEN 'DZ'
/: IF &SAVE_EVENT& EQ u2018ZPR01u2019 OR &SAVE_EVENT& EQ u2018ZPR06u2019
D1 <C4>Cheque Number/Bank Reference,,Payment Method,,Amount,,Cur,,</>
/: ENDIF
/: WHEN OTHERS
D1 <C4>Payment Method,,Cheque Number/Bank Reference,,Amount,,Cur,,</>
/: ENDCASE
/: ENDIF
I am getting below error in the the if statement (5th line) in sap script.
Error is "AND, OR or end of condition expected".
What is error in the 5th line?
Thanks in advanceHi,
In sap script, always give conditon in a sinlge line. Dont break the condition into many lines.
/: IF &WA_BSEG_IN-BUKRS& EQ '1000' OR &WA_BSEG_IN-BUKRS& EQ'2000' OR &WA_BSEG_IN-BUKRS& EQ '4000'
Thanks. -
Does anyone know how to re-write this so that it actually
works? Can't seem
to find anythingthat gives me a solid enough clue even if I
simplify it.
Thanks,
Craig
SELECT *
FROM notice
IF jobtype = 'MMColParam' AND onoff=-1 AND ndate >= date()
THEN
ORDER BY ndate ASC
ELSEIF 'MMColParam'='old' AND onoff=-1 AND ndate <= date()
THEN
ORDER BY ndate DESC
END IFProbably because queries are part of the database and as such
are written in
SQL, not VBScript.
Look up the CASE statement. In an SQL resource, not a VB
site.
"Craig" <[email protected]> wrote in message
news:f49ei8$21p$[email protected]..
> Does anyone know how to re-write this so that it
actually works? Can't
> seem to find anythingthat gives me a solid enough clue
even if I simplify
> it.
>
> Thanks,
> Craig
>
> SELECT *
> FROM notice
> IF jobtype = 'MMColParam' AND onoff=-1 AND ndate >=
date() THEN
> ORDER BY ndate ASC
> ELSEIF 'MMColParam'='old' AND onoff=-1 AND ndate <=
date() THEN
> ORDER BY ndate DESC
> END IF
> -
In RTF Template how to Hide a row conditionally
Hi,
Have requirement to hide Row based on condition. I have table in that 4 rows are there. Want to hide row based on condition.tried following statement didn't work.
<if@row:field!="Yes"><?end if?>
Help me to reslove this issue..
Thanks
-sriniNeed more details. What is your field name? You could try this: <?if: field!='Yes'?> (no double quotes) <?end if?>
Do you have a for-each in your code? Use it after that and enclose all the columns you want to hide between the if and end if condition.
or send me the template and xml to [email protected]
Check out the report developers guide and the row formatting section for an example as well.
You can just use an <?if:condition?> <?end if?> to do this.
Edited by: BIPuser on Apr 21, 2011 1:55 PM -
End Routine - populating Target Field based on Master Data
Hi,
I have an issue with my End Routine in BI 7.0. The scenario is as follows....
The Target-Fields ZSALES_OFFICE , 0SALES_CHANNEL etc. are being mapped 1:1 from their respective source fields. In addition to these target fields I have a target field 0SALESORG which I need to populate based on the values from 0COMP_CODE which is an attribute of ZSALES_OFFICE. The values of 0COMP_CODE are 9000, 9001, 9002 and 9003 respectively. The end routine condition needs to be implemented as follows...
For every 0COMP_CODE which has value 9000, 0SALESORG should be populated with the value "EAST". Similarly for every 0COMP_CODE which has value 9001, 0SALESORG should be populated with the value "WEST", for every 0COMP_CODE which has value 9002, 0SALESORG should be populated with the value "NORTH" and for every 0COMP_CODE which has value 9003, 0SALESORG should be populated with the value "SOUTH". I tried the following code but it doesnt seem to work. Could you pls help!!
Thanks,
SD
DATA: it_tab4 TYPE TABLE OF /BIC/PZF31SALOFF,
wa_tab4 TYPE /BIC/PZF31SALOFF.
SELECT *
FROM /BIC/PZF31SALOFF
INTO CORRESPONDING FIELDS OF TABLE it_tab4.
sort it_tab4 by /BIC/ZF31SALOFF.
LOOP AT RESULT_PACKAGE
INTO <result_fields>.
read table it_tab4
with key /BIC/ZF31SALOFF = <result_fields>-/BIC/ZF31SALOFF
into wa_tab4
binary search.
if sy-subrc eq 0.
CASE wa_tab4-comp_code.
WHEN '9000'.
<result_fields>-salesorg = 'EAST'.
WHEN '9100'.
<result_fields>-salesorg = 'WEST'.
WHEN '9200'.
<result_fields>-salesorg = 'NORTH'.
WHEN '9300'.
<result_fields>-salesorg = 'SOUTH'.
MODIFY it_tab4 FROM wa_tab4.
ENDCASE.
endif.
ENDLOOP.Replace your select statement ,
SELECT *
FROM /BIC/PZF31SALOFF
INTO CORRESPONDING FIELDS OF TABLE it_tab4.
instead of selecting all the fields , pick only the fields which are required.(one good performance improvement)
SELECT /BIC/PZF31SALOFF comp_code
FROM /BIC/PZF31SALOFF
INTO CORRESPONDING FIELDS OF TABLE it_tab4.
Remove the line below , this is not required
MODIFY it_tab4 FROM wa_tab4. -
Problem of DIFF (Rounding Off) Condition Type in Sales Pricing Procedure
Hi All,
This problem is related to Sales Order. The system is not picking up a condition type in the pricing procedure.
For example when I am raising a sales Order where the Trade Price is being calculated with the help of a Alternative Calculation Type , Subtotal 1 , X in the the Print column and Posting Key ERL are assigned to it.Here in the end the condition type DIFF is not getting populated in the pricing though it is maintained in the pricing procedure. When I am checking in the pricing analysis the error message and its detailed description which is shown as follows -
DIFF 011 Condition ignored (requirement 013 not fulfilled)
The requirement 1. was assigned to this condition in the pricing procedure. This requirement was not met in the preliminary condition step, and so the condition was excluded from further processing.
You can use Additional information to display the requirements used.
Now considering the above scenario please suggest to attain my requirement.
Thanks & Regards
PriyankaDear Priyanka,
The "reqt" field in the pricing procedure basically tells d system that the routine mentioned in this field is a sort of prerequisite without fullfilling of which the associated condition type will not get xecuted.
In ur case u have selected "1" which is for condition types A001, B001 etc used in "material listing / xclusion" function.
For condition type DIFF, the correct value is "13" i.e "Rounding as per T001R".
So just replace "1" with "13", things will b fine.
Please close the thread if answered.
regards
Param -
Conditional Text in Table - Problems with row height adjustment
Hey there,
I’m german but I try to express my problem in english as good as I can. Not always easy with the different menu names. Hope you get what I want to say! :-)
As you can see in my attached screenshot, I placed text in a table.
Text height is set to: minimum 1,5 … so it adjusts to the amount of text.
This is what I want - it should adjust the height to the marked/aktivated conditional text.
It always adjusts the hight when I blind out the first line oder lines in between (e.g. line 2+3 of 4).
But if I want to blind out the last line(s), there is a ¶ at the end and a extra blank line with the #.
I know, the # stands for the following hidden Text, but why does it work with the red/green text.
There is also text hidden (green), but the mark # is right after the last word - not in a new line.
Has anyone a solution for this?
Thanks in advance!That's ok so far. A paragraph sign at the end of a text forces a new line.
To change that do the following:
For every condition you need another condition just for the paragraph sign that comes immediately after the condition. Not after every paragraph of one condition, but at the end of every consecutive numbers of paragraphs of the same condition.
So in your third example you'll need two conditions more:
1. One for the paragraph sign at the end of condition "meaasurements"
2. One for the paragraph sign at the end of condition "price 2"
Whenever you make the other conditions invisible, you also have to turn off the new conditions that only control the paragraph signs.
See the following screenshots:
Uwe -
How to add the condition dynamically???
Dear All,
Here is procedure
CREATE OR REPLACE PROCEDURE pp1 (mstring in varchar2)
IS
-- vyearqtr NUMBER := myearqtr;
-- vyearnum NUMBER := myearnum;
vstring VARCHAR2(1000) := mstring;
vnum VARCHAR2(10);
CURSOR c1 is
SELECT TO_CHAR(a.COLUMN_VALUE) num
FROM TABLE(CAST(split(vstring,',')as split_tbl)) a;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO vnum;
exit when c1%notfound;
INSERT INTO ibs_cbs_temp
select a.YearQtr,a.cgs_name Groupname,a.Code,a.Name1,
Round((nvl(bSum1, 0) + nvl(cSum1, 0) + nvl(dSum1, 0) +
nvl(eSum1, 0) + nvl(fSum1, 0)) / 1000000) as TOTAL,
Round((nvl(bSum1, 0)) / 1000000) as MaturityCode1,
Round((nvl(cSum1, 0)) / 1000000) as MaturityCode2,
Round((nvl(dSum1, 0)) / 1000000) as MaturityCode3,
Round((nvl(eSum1, 0)) / 1000000) as MaturityCode4,
Round((nvl(fSum1, 0)) / 1000000) as MaturityCode5,
Round((nvl(gBank, 0)) / 1000000) as sBank,
Round((nvl(hBank, 0)) / 1000000) as SPrivate,
Round((nvl(iBank, 0)) / 1000000) as SPublic,
Round((nvl(i1Bank, 0)) / 1000000) as SUnallocated
from (Select distinct
cg.cgs_name,aq.CTY_Code as Code,aq.CTY_Name as Name1,ibs_work_bankdata.bd_yrqtr as yearqtr
from Ibs_Countrygroups cg
INNER JOIN IBS_CountryMaster aq on cg.cgs_id=aq.cty_ctygrpid and cg.cgs_active=1 and aq.cty_active=1
INNER JOIN ibs_work_bankdata ON aq.CTY_Code =ibs_work_bankdata.bd_councd
INNER JOIN ibs_bankmaster bk on ibs_work_bankdata.bd_bkcode = bk.bnk_code
INNER JOIN ibs_countrymaster cm on bk.bnk_countryofinc = cm.cty_id
INNER JOIN IBS_ALCategory ON ibs_work_bankdata.bd_alcd = IBS_ALCategory.Alc_Code
where ibs_work_bankdata.bd_yrqtr = vnum -- VARIABLE ASSIGNED vnum
group by cg.cgs_name,aq.CTY_Name,aq.CTY_Code,ibs_work_bankdata.bd_yrqtr)a
left join
(select sum((case
when ibs_work_bankdata.bd_matcd = 1 AND
-- start
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN'))
-- end
then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as bSum1,
sum((case
when ibs_work_bankdata.bd_matcd = 2 AND
--start
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN'))
--end
then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as cSum1,
sum((case when
ibs_work_bankdata.bd_matcd = 3 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr) else 0 end)) as dSum1,
sum((case
when ibs_work_bankdata.bd_matcd = 4 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as eSum1,
sum((case
when ibs_work_bankdata.bd_matcd = 5 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as fSum1,
sum((case
when IBS_Sector.SEC_Parent = 0 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as gBank,
sum((case
when IBS_Sector.SEC_Parent = 1 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and ALC_Code in ('11', '21', '31
') and bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as hBank,
sum((case
when IBS_Sector.SEC_Parent = 2 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as iBank,
sum((case
when IBS_Sector.SEC_Parent = 3 AND
((CTY_Code = 'IN' and
(((bd_forcd = 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN' and bd_sectcd <> '11') or
(bd_forcd <> 'IN' and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')))) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'Y') and
ALC_Code in ('11', '21', '31') and
bd_councd = CTY_Code) or
((CTY_Code <> 'IN' and
CTY_BIS_REPORTING_CBS = 'N') and
ALC_Code in ('11', '21', '31') and
bd_councd <> 'IN')) then
getvalueinusd(Abs(ibs_work_bankdata.bd_fc_bal) +
Abs(ibs_work_bankdata.bd_fc_int),
(select ibs_currencymaster.cur_id
from ibs_currencymaster
where ibs_work_bankdata.bd_curcd =
ibs_currencymaster.cur_code),
ibs_work_bankdata.bd_yrqtr)
else
0
end)) as i1Bank,
ibs_work_bankdata.bd_councd as Cty_Id
FROM IBS_CountryMaster aq
INNER JOIN ibs_work_bankdata ON aq.CTY_Code =ibs_work_bankdata.bd_councd
inner join ibs_bankmaster bk on ibs_work_bankdata.bd_bkcode =bk.bnk_code
inner join ibs_countrymaster cm on bk.bnk_countryofinc = cm.cty_id
INNER JOIN IBS_Sector ON ibs_work_bankdata.bd_sectcd =IBS_Sector.Sec_Code
INNER JOIN IBS_ALCategory ON ibs_work_bankdata.bd_alcd =IBS_ALCategory.Alc_Code
INNER JOIN IBS_ALTypes ON ibs_work_bankdata.bd_typecd =IBS_ALTypes.Act_Code
INNER JOIN IBS_MaturityCodeMaster ON ibs_work_bankdata.bd_matcd =IBS_MaturityCodeMaster.MCM_Code
where
ibs_work_bankdata.bd_yrqtr = vnum -- VARIABLE ASSIGNED vnum
group by ibs_work_bankdata.bd_councd) l on a.Code = l.CTY_Id
order by total desc;
END LOOP;
Close C1;
END;
The condition between -- start and --end Here I want to pass this condition dynamically.
Any one please give me soluion.
I am in very tense.
Thanks in advance.Hi,
I used dynamic sql but I got missing right parenthesis error.
Here is my procedure;
CREATE OR REPLACE PROCEDURE PRAT(mstring in varchar2, mconditions in varchar2)
IS
-- vyearqtr NUMBER := myearqtr;
-- vyearnum NUMBER := myearnum;
vstring VARCHAR2(1000) := mstring;
vnum VARCHAR2(10);
vconditions VARCHAR2(4000) := mconditions;
v_strvar varchar2(32767);
CURSOR c1 is
SELECT TO_CHAR(a.COLUMN_VALUE) num
FROM TABLE(CAST(split(vstring,',')as split_tbl)) a;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO vnum;
exit when c1%notfound;
-- EXECUTE IMMEDIATE
v_strvar:= 'INSERT INTO ibs_cbs_temp3';
v_strvar:= v_strvar ||' select a.YearQtr,a.cgs_name Groupname,a.Code,a.Name1,';
v_strvar:= v_strvar ||' Round((nvl(bSum1, 0) + nvl(cSum1, 0) + nvl(dSum1, 0) +';
v_strvar:= v_strvar ||' nvl(eSum1, 0) + nvl(fSum1, 0)) / 10000000) as TOTAL,';
v_strvar:= v_strvar ||' Round((nvl(bSum1, 0)) / 10000000) as MaturityCode1,';
v_strvar:= v_strvar ||' Round((nvl(cSum1, 0)) / 10000000) as MaturityCode2,';
v_strvar:= v_strvar ||' Round((nvl(dSum1, 0)) / 10000000) as MaturityCode3,';
v_strvar:= v_strvar ||' Round((nvl(eSum1, 0)) / 10000000) as MaturityCode4,';
v_strvar:= v_strvar ||' Round((nvl(fSum1, 0)) / 10000000) as MaturityCode5,';
v_strvar:= v_strvar ||' Round((nvl(gBank, 0)) / 10000000) as sBank,';
v_strvar:= v_strvar ||' Round((nvl(hBank, 0)) / 10000000) as SPrivate,';
v_strvar:= v_strvar ||' Round((nvl(iBank, 0)) / 10000000) as SPublic,';
v_strvar:= v_strvar ||' Round((nvl(i1Bank, 0)) / 10000000) as SUnallocated';
v_strvar:= v_strvar ||' from (Select distinct';
v_strvar:= v_strvar ||' cg.cgs_name,aq.CTY_Code as Code,aq.CTY_Name as Name1,';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr as yearqtr';
v_strvar:= v_strvar ||' from Ibs_Countrygroups cg';
v_strvar:= v_strvar ||' INNER JOIN IBS_CountryMaster aq ';
v_strvar:= v_strvar ||' on cg.cgs_id=aq.cty_ctygrpid and cg.cgs_active=1 ';
v_strvar:= v_strvar ||' and aq.cty_active=1';
v_strvar:= v_strvar ||' INNER JOIN ibs_org_bankdata ';
v_strvar:= v_strvar ||' ON aq.CTY_Code =ibs_org_bankdata.bd_councd';
v_strvar:= v_strvar ||' INNER JOIN ibs_bankmaster bk ';
v_strvar:= v_strvar ||' on ibs_org_bankdata.bd_bkcode = bk.bnk_code';
v_strvar:= v_strvar ||' INNER JOIN ibs_countrymaster cm ';
v_strvar:= v_strvar ||' on bk.bnk_countryofinc = cm.cty_id';
v_strvar:= v_strvar ||' INNER JOIN IBS_ALCategory ';
v_strvar:= v_strvar ||' ON ibs_org_bankdata.bd_alcd = IBS_ALCategory.Alc_Code';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_yrqtr = '|| vnum ;
v_strvar:= v_strvar ||' group by cg.cgs_name,aq.CTY_Name,';
v_strvar:= v_strvar ||' aq.CTY_Code,ibs_org_bankdata.bd_yrqtr)a';
v_strvar:= v_strvar ||' left join';
v_strvar:= v_strvar ||' (select sum((case';
v_strvar:= v_strvar ||' when ibs_org_bankdata.bd_matcd = 1 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as bSum1,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when ibs_org_bankdata.bd_matcd = 2 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as cSum1,';
v_strvar:= v_strvar ||' sum((case when';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_matcd = 3 AND '||vconditions;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr) else 0 end)) as dSum1,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when ibs_org_bankdata.bd_matcd = 4 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as eSum1,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when ibs_org_bankdata.bd_matcd = 5 AND '||vconditions;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as fSum1,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when IBS_Sector.SEC_Parent = 0 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as gBank,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when IBS_Sector.SEC_Parent = 1 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as hBank,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when IBS_Sector.SEC_Parent = 2 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as iBank,';
v_strvar:= v_strvar ||' sum((case';
v_strvar:= v_strvar ||' when IBS_Sector.SEC_Parent = 3 AND '||vconditions ;
v_strvar:= v_strvar ||' then';
v_strvar:= v_strvar ||' getvalueininr(Abs(ibs_org_bankdata.bd_fc_bal) +';
v_strvar:= v_strvar ||' Abs(ibs_org_bankdata.bd_fc_int),';
v_strvar:= v_strvar ||' (select ibs_currencymaster.cur_id';
v_strvar:= v_strvar ||' from ibs_currencymaster';
v_strvar:= v_strvar ||' where ibs_org_bankdata.bd_curcd =';
v_strvar:= v_strvar ||' ibs_currencymaster.cur_code),';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr)';
v_strvar:= v_strvar ||' else';
v_strvar:= v_strvar ||' 0';
v_strvar:= v_strvar ||' end)) as i1Bank,';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_councd as Cty_Id';
v_strvar:= v_strvar ||' FROM IBS_CountryMaster aq';
v_strvar:= v_strvar ||' INNER JOIN ibs_org_bankdata ';
v_strvar:= v_strvar ||' ON aq.CTY_Code =ibs_org_bankdata.bd_councd';
v_strvar:= v_strvar ||' inner join ibs_bankmaster bk ';
v_strvar:= v_strvar ||' on ibs_org_bankdata.bd_bkcode =bk.bnk_code';
v_strvar:= v_strvar ||' inner join ibs_countrymaster cm ';
v_strvar:= v_strvar ||' on bk.bnk_countryofinc = cm.cty_id';
v_strvar:= v_strvar ||' INNER JOIN IBS_Sector ';
v_strvar:= v_strvar ||' ON ibs_org_bankdata.bd_sectcd =IBS_Sector.Sec_Code';
v_strvar:= v_strvar ||' INNER JOIN IBS_ALCategory ';
v_strvar:= v_strvar ||' ON ibs_org_bankdata.bd_alcd =IBS_ALCategory.Alc_Code';
v_strvar:= v_strvar ||' INNER JOIN IBS_ALTypes ';
v_strvar:= v_strvar ||' ON ibs_org_bankdata.bd_typecd =IBS_ALTypes.Act_Code';
v_strvar:= v_strvar ||' INNER JOIN IBS_MaturityCodeMaster ';
v_strvar:= v_strvar ||' ON ibs_org_bankdata.bd_matcd =IBS_MaturityCodeMaster.MCM_Code';
v_strvar:= v_strvar ||' where';
v_strvar:= v_strvar ||' ibs_org_bankdata.bd_yrqtr = '||vnum ;
v_strvar:= v_strvar ||' group by ibs_org_bankdata.bd_councd) ';
v_strvar:= v_strvar ||' l on a.Code = l.CTY_Id';
v_strvar:= v_strvar ||' order by total desc';
EXECUTE IMMEDIATE v_strvar;
END LOOP;
CLOSE C1;
COMMIT;
END;
/please help. -
Alphabetize conditional text tags
Is it possible to rearrange the tags in the Conditional Text pod so that they are alphabetized?
Assuming that they are presented in the same order as they appear in the data structures, it should be possible to save the document as MIF and reorder all the
<Condition ... > # end of Condition
tags inside
<ConditionCatalog ... > # end of ConditionCatalog
then re-save the MIF, open and re-save as .FM. -
Framescript: search and replace condition name in a bunch of mif files
Hello fellows,
I would like to loop through all mif files listed in a book, and search/replace specific condition names with other ones.
This can be done in each FM file as follows:
Sub ProcessDoc
Loop ForEach(CondFmt) In(vCurrentDoc) LoopVar(vCondFmt)
If vCondFmt.Name = (vCurrentName)
Set vCondFmt.Name = (vFutureName);
EndIf
EndLoop
EndSub
The question is what would be the code in case of mif files. Conditions are defined in mif files as follows:
<Conditional
<InCondition `SampleCond'>
<InCondition `SampleCond'>
> # end of Conditional
Thank you for your input in advance!Hi Jang,
Thank you for your response. Interestingly enough, FM allows changing the Track Changes conditions to any other conditions using the script, but not the other way around. This can only be done after saving an FM file as MIF and running textual search/replace on all relevant <InCondition> instances in a text editor.
Any idea why FM refuses to change a condition name to FM8_TRACK_CHANGES_ADDED for example?
Thank you! -
Handle not go to correct condition
Hi all,
I have written a function given below.
but when I test from dual table with wrong arguentments it is not printing dbms_output statement ideally.
its only print "no data found 1" first conditon but not going in others "when no data found exception" ideally its print all the dbms_output statements written in
"when no data found exception".
pls reveiw and let me know where I am wrong.
pls its urgent.
I am pasting some part of my function.
Thanks
Amit
set serveroutput on
create or replace
FUNCTION xx_get_person_id_st_owner
p_project_role_id pa_project_assignments.project_role_id%TYPE,
p_gov_prj_y_n VARCHAR2,
p_attr8 VARCHAR2, -- Contractor Flag
p_metro VARCHAR2
RETURN NUMBER
IS
v_person_id apps.per_people_x.person_id%TYPE := NULL;
v_project_role_id apps.pa_project_assignments.project_role_id%TYPE;
v_domain apps.pa_project_role_types.attribute1%TYPE := NULL;
V_EMP_NUMBER APPS.PER_PEOPLE_X.EMPLOYEE_NUMBER%type := null;
begin Main
DBMS_OUTPUT.PUT_LINE ('inside fuct ');
BEGIN
SELECT attribute1
into V_DOMAIN
FROM apps.pa_project_role_types
where PROJECT_ROLE_ID = P_PROJECT_ROLE_ID;
DBMS_OUTPUT.PUT_LINE ('value of domain : '||V_DOMAIN );
EXCEPTION when OTHERS then
DBMS_OUTPUT.PUT_LINE ('inside others 1' );
NULL;
END;
if P_GOV_PRJ_Y_N = 'N' then
DBMS_OUTPUT.PUT_LINE ('inside gov flag is N ');
begin
DBMS_OUTPUT.PUT_LINE ('just after begin' );
begin
select SSOC.XXX_ID
INTO v_emp_number
FROM xx_staffing_owner_config ssoc
WHERE ssoc.domain = v_domain
AND ssoc.primary_flag = 'Y'
AND ssoc.contractor_yn = p_attr8
and UPPER(SSOC.METRO) = UPPER(P_METRO)
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and SSOC.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
DBMS_OUTPUT.PUT_LINE ('just before if condition' );
IF v_emp_number IS NOT NULL THEN
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 1 is '||V_EMP_NUMBER );
-- RETURN v_person_id;
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 1' );
select SSOC.XXX_ID
INTO v_emp_number
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
WHERE SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'N'
AND SSOC.CONTRACTOR_YN = P_ATTR8
and UPPER(SSOC.METRO) = UPPER(P_METRO)
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and SSOC.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
DBMS_OUTPUT.PUT_LINE ('in exception' );
end;
-- when OTHERS
-- then null;
begin
IF v_emp_number IS NOT NULL THEN
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 2 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 2' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
when OTHERS
then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 3 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 3' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = P_METRO
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 4 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 4' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 5 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 5' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'N'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;Hi Alberto,
Actually I am new in this technology. I will remember all your points. Pls can u rectify the code. I think the problem is in exception handling. I am pasting the in two threads.
set serveroutput on
create or replace
FUNCTION xx_get_person_id_st_owner
p_project_role_id pa_project_assignments.project_role_id%TYPE,
p_gov_prj_y_n VARCHAR2,
p_attr8 VARCHAR2, -- Contractor Flag
p_metro VARCHAR2
RETURN NUMBER
IS
v_person_id apps.per_people_x.person_id%TYPE := NULL;
v_project_role_id apps.pa_project_assignments.project_role_id%TYPE;
v_domain apps.pa_project_role_types.attribute1%TYPE := NULL;
V_EMP_NUMBER APPS.PER_PEOPLE_X.EMPLOYEE_NUMBER%type := null;
begin --Main--
DBMS_OUTPUT.PUT_LINE ('inside fuct ');
BEGIN
SELECT attribute1
into V_DOMAIN
FROM apps.pa_project_role_types
where PROJECT_ROLE_ID = P_PROJECT_ROLE_ID;
DBMS_OUTPUT.PUT_LINE ('value of domain : '||V_DOMAIN );
EXCEPTION when OTHERS then
DBMS_OUTPUT.PUT_LINE ('inside others 1' );
NULL;
END;
if P_GOV_PRJ_Y_N = 'N' then
DBMS_OUTPUT.PUT_LINE ('inside gov flag is N ');
begin
DBMS_OUTPUT.PUT_LINE ('just after begin' );
begin
select SSOC.XXX_ID
INTO v_emp_number
FROM xx_staffing_owner_config ssoc
WHERE ssoc.domain = v_domain
AND ssoc.primary_flag = 'Y'
AND ssoc.contractor_yn = p_attr8
and UPPER(SSOC.METRO) = UPPER(P_METRO)
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and SSOC.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
DBMS_OUTPUT.PUT_LINE ('just before if condition' );
IF v_emp_number IS NOT NULL THEN
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 1 is '||V_EMP_NUMBER );
-- RETURN v_person_id;
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 1' );
select SSOC.XXX_ID
INTO v_emp_number
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
WHERE SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'N'
AND SSOC.CONTRACTOR_YN = P_ATTR8
and UPPER(SSOC.METRO) = UPPER(P_METRO)
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and SSOC.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
DBMS_OUTPUT.PUT_LINE ('in exception' );
end;
-- when OTHERS
-- then null;
begin
IF v_emp_number IS NOT NULL THEN
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 2 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 2' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
when OTHERS
then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 3 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 3' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = P_METRO
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 4 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 4' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 5 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 5' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'N'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 6 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 6' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'N'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = P_METRO
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 7 is '||v_emp_number );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 7' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'N'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = P_PROJECT_ROLE_ID
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 8 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 8' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = P_METRO
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = 999
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 9 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 9' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'N'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = P_METRO
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = 999
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
-------------role conditions---------
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 10 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 10' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = 999
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 11 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 11' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = P_METRO
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = 999
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 12 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 12' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = 'All'
and SSOC.PRIMARY_FLAG = 'Y'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and SSOC.PROJECT_ROLE_ID = 999;
-- and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null then
V_PERSON_ID := GET_ACTIVE_PERSONID(V_EMP_NUMBER);
DBMS_OUTPUT.PUT_LINE ('value of v_emp_number 13 is '||V_EMP_NUMBER );
end if;
EXCEPTION when NO_DATA_FOUND
then
DBMS_OUTPUT.PUT_LINE ('no data found 13' );
select SSOC.XXX_ID
into V_EMP_NUMBER
from XX_PA.XX_STAFFING_OWNER_CONFIG SSOC
where SSOC.DOMAIN = V_DOMAIN
and SSOC.PRIMARY_FLAG = 'N'
and SSOC.CONTRACTOR_YN = P_ATTR8
and SSOC.METRO = 'All'
and SSOC.GOVERNMENT_SERVICES_FLAG = 'N'
and ssoc.PROJECT_ROLE_ID = 999
and TRUNC(sysdate) between START_DATE_ACTIVE and END_DATE_ACTIVE;
-- when OTHERS
-- then null;
end;
begin
if V_EMP_NUMBER is not null thenEdited by: BluShadow on 31-Oct-2012 09:02
added {noformat}{noformat} tags as you were asked to do yourself but clearly couldn't bother. Read {message:id=9360002} and learn how to do it yourself. -
How to get validity end using bapi_contract_create
Dear all,
Iam passing item no ,validity start andvalidity end to condition validity table but BAPI is taking only validity from ,it is not taking validity to and also it is taking defaulty 'X' after passing date also.
how to change condition validity periods using this FM.
Please any one knows suggest me.
Thanks & Regards
shivHi ,
If you are trying to test the FM through TCode SE37 then it will not give you the desired output.Do one thing create a test program and there you call the FM with your data.I hope in this way you can solve the issue.
Regards,
Sarbajit. -
Team,
Can you please let me know if <DISPLAY CONDITION> has an end tag.
While debugging i have noticed that it take under it, mean it does not end it condition if i dont give another condition.
Please let me know if there is any other alternative for if else statements in etext template
Thanks
Bhupendrayou can use
IF ELSE END IF
have seen very very complex e-text templates with lot of conditions, did not face any issue.
Where did you get struck ?
what is the issue you are facing on this >? -
Use of function module RHPD_SEARCH_PEOPLE_WITH_QUAL
Hello Gurus,
I am currently working on HR module. I want to know how RHPD_SEARCH_PEOPLE_WITH_QUAL is used. I am not able to figure out as i don't have system to work on. Just conceptual information is enough(code will be handy too). but a rough draft will do.
Thanks in advance.
Thanks and Regards,
Saurabh ChhatreHi,
The code is below
* CORRECTIONS
* DATE CORRECTION NOTE DESCRIPTION
* 06.03.2001 L9CK045041 0387320 Selection of applicants
* 11.06.2001 L9CK055799 0411739 Wrong search for Applicants in TA: PBAP
FUNCTION rhpd_search_people_with_qual .
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(PLVAR) LIKE HRP1000-PLVAR
*" VALUE(BEGDA) LIKE HRP1000-BEGDA DEFAULT SY-DATUM
*" VALUE(ENDDA) LIKE HRP1000-ENDDA DEFAULT SY-DATUM
*" VALUE(SUBTY) LIKE HRP1001-SUBTY DEFAULT 'B032'
*" VALUE(GET_PERS_NAME) LIKE SY-INPUT DEFAULT 'X'
*" VALUE(ONLY_ESSENTIAL) TYPE ESSENTIAL OPTIONAL
*" VALUE(CONSIDER_ALTQ) TYPE SUBSTITUTE OPTIONAL
*" VALUE(TARGET_AP_IEA) LIKE SY-INPUT DEFAULT ' '
*" TABLES
*" QUALI_TAB STRUCTURE QUALI_PROF
*" IMP_PERS_TAB STRUCTURE HRSOBID OPTIONAL
*" PERS_TAB STRUCTURE PERSQ_PROF
*" ALTQ_TAB STRUCTURE ALTQ_STRU OPTIONAL
*" APSTA_RANGE STRUCTURE RANGE_APSTA OPTIONAL
*" TARGET_OTYPE_TAB STRUCTURE HROTYPE OPTIONAL
*" EXCEPTIONS
*" NO_QUALIFICATION
*" NO_PERSON_FOUND
DATA: adata.
DATA: objects LIKE hrobject OCCURS 1 WITH HEADER LINE.
DATA: sobjects LIKE hrsobid OCCURS 1 WITH HEADER LINE.
DATA: i1001 LIKE p1001 OCCURS 1 WITH HEADER LINE.
DATA: sobid LIKE i1001-sobid.
DATA: BEGIN OF persons OCCURS 1,
sclas LIKE i1001-sclas,
sobid LIKE i1001-sobid.
DATA: END OF persons.
DATA: pad31 LIKE pad31.
DATA: ok_flag.
DATA: l_otype like hrobject-otype.
DATA: conditions LIKE hrcond OCCURS 1 WITH HEADER LINE.
DATA: condition_id LIKE hrrhdb-condition.
DATA: h_no_persons.
ranges: only_otype for objec-otype.
DATA: h_tabix like sy-tabix.
DATA: t77eo_prog LIKE t77eo-prog.
data: l_function_module like rs38l-name.
Field-symbols: <i1001-adata>. "LudwigUNI
* read t77s0 parameters
PERFORM read_t77s0_parameters_for_pe.
* nur bei "erfüllt"-Verknüpfung Zusatzdaten (Ausprägung) lesen
IF subty+1(3) = $ownsb+1(3). " '032' erfüllt
adata = 'X'.
ENDIF.
* Tabelle für read_infty füllen
LOOP AT quali_tab.
objects-plvar = plvar.
objects-otype = $quali.
objects-objid = quali_tab-qualid.
APPEND objects.
ENDLOOP.
IF sy-subrc > 0.
RAISE no_qualification.
ENDIF.
* Export-Tabelle leeren
CLEAR pers_tab.
REFRESH pers_tab.
* Wenn der Paramter target_iea gesetzt ist, wird die Tabelle
* Target_otype_tab entsprechend gefüllt ( Doku zu Parameter beachten )
IF NOT target_ap_iea IS INITIAL.
READ TABLE target_otype_tab WITH KEY otype = $pernr.
IF sy-subrc NE 0.
h_no_persons = 'X'.
ENDIF.
IF target_ap_iea EQ 'A' OR target_ap_iea EQ 'I'
OR target_ap_iea EQ 'E'.
target_otype_tab-otype = $pernr.
APPEND target_otype_tab.
ENDIF.
IF target_ap_iea EQ 'A' OR target_ap_iea EQ 'E'.
target_otype_tab-otype = $applk.
APPEND target_otype_tab.
ENDIF.
SORT target_otype_tab BY otype.
DELETE ADJACENT DUPLICATES FROM target_otype_tab.
ENDIF.
* Für binary search
SORT target_otype_tab.
* INSERT by XSC *****
* READ TABLE imp_pers_tab INDEX 1 TRANSPORTING NO FIELDS.
* IF sy-subrc = 0.
* Falls Zielpersonen schon bekannt sind, Bedingungen aufbauen
* REFRESH conditions.
* CLEAR conditions.
* Einschränkung auf Zielobjekttypen
* LOOP AT imp_pers_tab.
* READ TABLE target_otype_tab WITH KEY otype = imp_pers_tab-otype
* BINARY SEARCH.
* IF sy-subrc EQ 0.
* conditions-field = 'SCLAS'.
* conditions-opera = 'EQ'.
* conditions-low = imp_pers_tab-otype.
* APPEND conditions.
* conditions-field = 'SOBID'.
* conditions-opera = 'EQ'.
* conditions-low = imp_pers_tab-sobid.
* APPEND conditions.
* ELSE.
* is there any entry in target otype table
* READ TABLE target_otype_tab INDEX 1 TRANSPORTING NO FIELDS.
* IF sy-subrc <> 0.
* there is no entry -> TAKE ALL object types !!!
* conditions-field = 'SCLAS'.
* conditions-opera = 'EQ'.
* conditions-low = imp_pers_tab-otype.
* APPEND conditions.
* conditions-field = 'SOBID'.
* conditions-opera = 'EQ'.
* conditions-low = imp_pers_tab-sobid.
* APPEND conditions.
* ENDIF. "any entry in target otype ?
* ENDIF. "allowed in target otype table ?
* ENDLOOP.
* INSERT by XSC *****
READ TABLE imp_pers_tab INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
* Falls Zielpersonen schon bekannt sind, Bedingungen aufbauen
REFRESH conditions.
CLEAR conditions.
* INSERT by Ludwig *****
Loop at imp_pers_tab.
if l_otype = imp_pers_tab-otype.
continue.
else. "l_otype <> im_pers_tab-otype = new objecttype
only_otype-sign = 'I'.
only_otype-option = 'EQ'.
only_otype-low = imp_pers_tab-otype.
append only_otype.
l_otype = imp_pers_tab-otype.
endif.
endloop.
delete target_otype_tab where not otype in only_otype.
LOOP AT target_otype_tab.
conditions-field = 'SCLAS'.
conditions-opera = 'EQ'.
conditions-low = target_otype_tab-otype.
APPEND conditions.
ENDLOOP.
* Verknüpfungsart:
conditions-field = 'SUBTY'.
conditions-opera = 'EQ'.
conditions-low = subty.
APPEND conditions.
* Zeitraumeingrenzung übernehmen
conditions-field = 'BEGDA'.
conditions-opera = 'LE'.
conditions-low = endda.
APPEND conditions.
conditions-field = 'ENDDA'.
conditions-opera = 'GE'.
conditions-low = begda.
APPEND conditions.
* Bedingungstabelle für select generieren
CALL FUNCTION 'RH_CONDITION_BUILD'
EXPORTING
infty = '1001'
IMPORTING
condition = condition_id
TABLES
condtab = conditions
EXCEPTIONS
empty_condtab = 1
no_db_field = 2
unknown_infty_db = 3
wrong_condition = 4
unknown_pad_db = 5
OTHERS = 6.
IF sy-subrc NE 0.
RAISE no_person_found.
ENDIF.
* Passende Objekte suchen. Extend = 'D' -> Conditions beachten
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
* AUTHORITY = 'DISP'
* WITH_STRU_AUTH = 'X'
* ISTAT = ' '
extend = 'D'
* subty = subty
* begda = begda
* endda = endda
condition = condition_id
* SORT = 'X'
* WITH_EV = ' '
adata = adata
TABLES
i1001 = i1001
objects = objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
IF sy-subrc NE 0.
RAISE no_person_found.
ENDIF.
* Bedingung wieder löschen
CALL FUNCTION 'RH_CONDITION_DELETE'
EXPORTING
condition = condition_id
EXCEPTIONS
OTHERS = 0.
* INSERT by Ludwig *****
read table imp_pers_tab index 1 transporting no fields.
if sy-subrc = 0.
* The found persons in the table persons are all persons which
* have a valid qualification.
* Delete persons out of table persons which not belong to the
* organization_unit.
* Sort table persons by otype objectid objecttext qualiid and date
sort imp_pers_tab by plvar otype sobid.
clear h_tabix.
loop at i1001.
h_tabix = sy-tabix.
read table imp_pers_tab with key otype = i1001-sclas
sobid = i1001-sobid
binary search.
if sy-subrc <> 0. "person not in the organzation_unit
delete i1001 index h_tabix. "delete person out of i1001
endif.
endloop.
endif. "imported persons
* INSERT by XSC *****
ELSEIF ( target_ap_iea EQ 'I' ) OR
( target_ap_iea EQ 'E' ) OR
( target_ap_iea EQ 'A' ).
* Sonderbehandlung für Bewerber, falls da : (für Bewerberverwaltung)
LOOP AT target_otype_tab. "Correction L9CK055799 0411739 11.06.2001
* Dynamisches Form zur Bewerberstatuseinschränkung lesen:
SELECT SINGLE * FROM t77eo WHERE otype = $applk.
t77eo_prog = t77eo-prog.
* Status der Bewerber beim RH_READ_OBJECT berücksichtigen:
READ TABLE apsta_range INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
PERFORM set_apsta IN PROGRAM (t77eo_prog) TABLES apsta_range
USING begda endda IF FOUND.
ENDIF.
ENDLOOP.
* Bedingungen aufbauen
REFRESH conditions.
CLEAR conditions.
* Einschränkung auf Zielobjekttyp:
* IF target_ap_iea eq 'A' or "Alle Bewerber selektieren
* target_ap_iea = 'E'. "externe Bewerber selektieren
* conditions-field = 'SCLAS'.
* conditions-opera = 'EQ'.
* conditions-low = $applk. "Bewerber:
* APPEND conditions.
* ENDIF.
* IF target_ap_iea eq 'A' or "Alle Bewerber selektieren
* target_ap_iea = 'I'. "interne Bewerber selektieren
* conditions-field = 'SCLAS'.
* conditions-opera = 'EQ'. "Personen auslesen: ! Rollen-
* conditions-low = $pernr. "interner Bewerber ! konzept
* APPEND conditions.
* ENDIF.
LOOP AT target_otype_tab.
conditions-field = 'SCLAS'.
conditions-opera = 'EQ'.
conditions-low = target_otype_tab-otype.
APPEND conditions.
ENDLOOP.
* Verknüpfungsart:
conditions-field = 'SUBTY'.
conditions-opera = 'EQ'.
conditions-low = subty.
APPEND conditions.
* Zeitraumeingrenzung übernehmen - Anfang Quali vor Ende Zeitraum
conditions-field = 'BEGDA'.
conditions-opera = 'LE'.
conditions-low = endda.
APPEND conditions.
conditions-field = 'ENDDA'.
conditions-opera = 'GE'.
conditions-low = begda.
APPEND conditions.
CALL FUNCTION 'RH_CONDITION_BUILD'
EXPORTING
infty = '1001'
IMPORTING
condition = condition_id
TABLES
condtab = conditions
EXCEPTIONS
empty_condtab = 1
no_db_field = 2
unknown_infty_db = 3
wrong_condition = 4
unknown_pad_db = 5
OTHERS = 6.
IF sy-subrc NE 0.
RAISE no_person_found.
ENDIF.
* Extend = 'D' -> Conditions beachten
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
* AUTHORITY = 'DISP'
* WITH_STRU_AUTH = 'X'
* ISTAT = ' '
extend = 'D'
* subty = subty
* begda = begda
* endda = endda
condition = condition_id
* SORT = 'X'
* WITH_EV = ' '
adata = adata
TABLES
i1001 = i1001
objects = objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
* applicant selection !
l_function_module = 'RHPD_DC_INTERPRET_TARGET_IEA'.
CALL FUNCTION 'FUNCTION_EXISTS' "XSC DC
EXPORTING
FUNCNAME = l_function_module
EXCEPTIONS
FUNCTION_NOT_EXIST = 1
OTHERS = 2.
IF SY-SUBRC = 0.
* HR SYSTEM
CALL FUNCTION l_function_module
EXPORTING
TARGET_AP_IEA = TARGET_AP_IEA
TABLES
I1001 = i1001.
else.
* NO HR SYSTEM
* -> no applicant selection or determination
ENDIF.
ELSE.
* Einschränkung auf Zielobjekttypen ungleich Bewerber:
* Ist jetzt nahezu das gleiche wie bei target_ap_iea ne space. Aber
* weil's dann übersichtlicher bleibt, steht's halt nochmal extra.
* Bedingungen aufbauen
CLEAR conditions.
REFRESH conditions.
* Einschränkung auf Zielobjekttypen: ( Sobids sind nicht bekannt )
LOOP AT target_otype_tab.
conditions-field = 'SCLAS'.
conditions-opera = 'EQ'.
conditions-low = target_otype_tab-otype.
APPEND conditions.
ENDLOOP.
* Verknüpfungsart:
conditions-field = 'SUBTY'.
conditions-opera = 'EQ'.
conditions-low = subty.
APPEND conditions.
* Zeitraumeingrenzung übernehmen
conditions-field = 'BEGDA'.
conditions-opera = 'LE'.
conditions-low = endda.
APPEND conditions.
conditions-field = 'ENDDA'.
conditions-opera = 'GE'.
conditions-low = begda.
APPEND conditions.
CALL FUNCTION 'RH_CONDITION_BUILD'
EXPORTING
infty = '1001'
IMPORTING
condition = condition_id
TABLES
condtab = conditions
EXCEPTIONS
empty_condtab = 1
no_db_field = 2
unknown_infty_db = 3
wrong_condition = 4
unknown_pad_db = 5
OTHERS = 6.
IF sy-subrc NE 0.
RAISE no_person_found.
ENDIF.
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
* AUTHORITY = 'DISP'
* WITH_STRU_AUTH = 'X'
* ISTAT = ' '
extend = 'D'
subty = subty
begda = begda
endda = endda
condition = condition_id
* SORT = 'X'
* WITH_EV = ' '
adata = adata
TABLES
i1001 = i1001
objects = objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
IF sy-subrc NE 0.
RAISE no_person_found.
ENDIF.
ENDIF.
* Die Bedingungen wieder löschen
CALL FUNCTION 'RH_CONDITION_DELETE'
EXPORTING
condition = condition_id
EXCEPTIONS
OTHERS = 0.
* Wenn nur Personen gefunden werden sollen, die auf jeden Fall einen
* Teil der Qualis (Mußanforderungen) haben,
* müssen die Personen wieder rausgeschmissen werden, die nicht diese
* Qualifikationen erfüllen.
IF only_essential = 'X'.
* Zunächst alle gefundenen Personen ermitteln:
LOOP AT i1001.
persons-sclas = i1001-sclas.
persons-sobid = i1001-sobid.
APPEND persons.
ENDLOOP.
SORT persons BY sclas sobid. "Schneller als
DELETE ADJACENT DUPLICATES FROM persons. "collect
* Dann die Personen wieder rausschmeißen, die nicht alle MußQ's haben:
LOOP AT persons.
LOOP AT quali_tab WHERE essential = 'X'.
READ TABLE i1001 WITH KEY objid = quali_tab-qualid
sclas = persons-sclas
sobid = persons-sobid.
IF sy-subrc > 0. "Person hat Quali nicht
IF consider_altq IS INITIAL. "ErsatzQ nicht beachten
DELETE persons. "also Person rausscheißen
EXIT.
ELSE. " consider_altq = 'X' SUCHE NACH ERSATZQUALIFIKATIONEN
CLEAR ok_flag.
LOOP AT altq_tab WHERE robid = quali_tab-qualid.
READ TABLE i1001 WITH KEY objid = altq_tab-tobid
sclas = persons-sclas
sobid = persons-sobid.
IF sy-subrc = 0. "Person hat ErsatzQ
ok_flag = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF ok_flag IS INITIAL.
DELETE persons.
EXIT.
ENDIF.
ENDIF. "consider_altq is initial. "ErsatQ beachten
ENDIF. "sy-subrc > 0. "Person hat Quali nicht
ENDLOOP. " at quali_tab
ENDLOOP. " at persons.
* Und noch die i1001 bereinigen:
LOOP AT i1001.
READ TABLE persons WITH KEY sclas = i1001-sclas
sobid = i1001-sobid.
IF sy-subrc > 0. "Person nicht in persons => in i1001 löschen
DELETE i1001.
ENDIF.
ENDLOOP.
ENDIF. " only_essential = 'X'
* Wenn Namen gewünscht, Text_buffer füllen.
IF NOT get_pers_name IS INITIAL.
LOOP AT i1001.
sobjects-plvar = plvar.
sobjects-otype = i1001-sclas.
sobjects-sobid = i1001-sobid.
APPEND sobjects.
ENDLOOP.
CALL FUNCTION 'RH_TEXT_BUFFER_FILL_EXTERNAL'
* EXPORTING
* CHECK_STRU_AUTH = 'X'
TABLES
objects = sobjects
EXCEPTIONS
OTHERS = 0.
ENDIF. " get_pers_name = 'X'. .
* Fülle Pers_tab.
LOOP AT i1001.
CLEAR pers_tab.
pers_tab-otype = i1001-sclas.
pers_tab-sobid = i1001-sobid.
IF get_pers_name = 'X'.
sobid = i1001-sobid.
CALL FUNCTION 'RH_READ_OBJECT'
EXPORTING
plvar = plvar
otype = i1001-sclas
* objid = objid
realo = sobid
* ISTAT = ' '
begda = begda
endda = endda
* LANGU = SY-LANGU
* OINTERVAL = 'X'
* STORE = 'X'
* CHECK_STRU_AUTH = 'X'
* READ_DB = ' '
IMPORTING
* obeg =
* oend =
* ostat =
* histo =
short = pers_tab-short
stext = pers_tab-stext
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc > 0.
CONTINUE.
ENDIF.
ENDIF.
IF pers_tab-stext IS INITIAL.
pers_tab-stext = pers_tab-short.
ENDIF.
pers_tab-qualid = i1001-objid(8).
READ TABLE quali_tab WITH KEY qualid = i1001-objid(8).
pers_tab-qualstxt = quali_tab-qualstxt.
pers_tab-essential = quali_tab-essential.
assign i1001-adata to <i1001-adata> casting type c. "LudwigUNI
pad31 = <i1001-adata>.
* get proficiency for the qualification in the future:
* profile-profcy = pad31-chara / 10000000 "for NUMC8
pers_tab-profcy = pad31-chara.
* Verknüpfungszeitraum füllen:
pers_tab-vbegda = i1001-begda.
pers_tab-vendda = i1001-endda.
APPEND pers_tab.
ENDLOOP.
* Einschränkung des Bewerberstatus zurücknehmen:
IF target_ap_iea EQ 'I' OR
target_ap_iea EQ 'E' OR
target_ap_iea EQ 'A'.
LOOP AT target_otype_tab WHERE otype = $applk.
PERFORM reset_apsta IN PROGRAM (t77eo_prog) IF FOUND.
ENDLOOP.
ENDIF.
ENDFUNCTION.
Regards,
Shailaja -
Report header issue in .RTF Template
Hi,
I have designed a .RTF Template, I need to display a Parameter in the header part of the template, If the Parameter doesn't contain values then I do not want to show them, Can I have If and End if condition in the header part, I believe I cannot use Field in the header part.
How do I achieve it, If you need the .RTF template i can upload.
Regards,
Ashoka BLHi,
Declare the parameter with the syntax <?param@begin:AAAA?>
And in the header use <?$AAAA?> if AAAA is the name of your parameter. If theres no value, it will automatically not display since the value is blank, No need of an if wrapper.
-Domnic
Maybe you are looking for
-
I've recently started using the check-in/check-out option in DW (cs4) and started experiencing a very frustrating issue. If I am connected to the remote server, DW wants to hang every few seconds. It doesn't matter what view I am in or if a file is o
-
Bluetooth connection with Mac Book Pro
How do I set up a Bluetooth connection with my Mac Book Pro?
-
Store a file's ref in a FileMaker container
Hello I am populating a FileMaker's database from numerous folders (more than 1000). When I try to store in a field of type Container a file's pathname corresponding to a Picture, it works. When the file's pathname correspond to a text file it fails.
-
Problems with inserted datagridview checkbox column
I have a few problems with a checkbox column added to a datagridview. The datagridview is bound by a binding source whose datasource is a datatable. I also add in the code a checkbox column: private void InitializeDataGridView() dgvInvoic
-
I have a master detail form i have three items in detail i want to delete one of them i wrote clear_record; commit; on when button pressed but it not works regards vikas Singhal