Convert p type into c type
hii experts,
i have a structure.
In that i use
V(8) TYPE P.
but when i save the file it gives dump.
it needs TYPE C.
so how i convert tthat PACKED type inco CHAR type.
Please provide me the code.
thanks
babbal
Hi,
do like this.
data : v_num(8) type p,
v_num1(8) type N,
v_num2(8) type c.
v_num1 = v_num.
v_num2 = v_num1.
Regards
Sandeep REddy
Similar Messages
-
Converting OBJECT Type into RECORD Type
folks,
Is there a way to Convert a OBJECT Type into a RECORD Type in Oracle PL/SQL, Because i have a stored procedure with RECORD Type as a IN parameter and as we know that we JDBC doesn't support calling or returning RECORD Types , So i was thinking of sending a OBJECT type and convert that to a RECORD type,
I appreciate any help with the code or point to the documentation,
thanks
KMfolks,
Is there a way to Convert a OBJECT Type into a RECORD Type in Oracle PL/SQL, Because i have a stored procedure with RECORD Type as a IN parameter and as we know that we JDBC doesn't support calling or returning RECORD Types , So i was thinking of sending a OBJECT type and convert that to a RECORD type,
I appreciate any help with the code or point to the documentation,
thanks
KM -
Problem with including types into other type...
Hi Experts,
here i ve created 2 table types like:
TYPES: BEGIN OF t_pr_ps_rpsco,
pspnr1 LIKE prps-pspnr,
posid LIKE prps-posid,
abgsl LIKE prps-abgsl,
pspid LIKE proj-pspid,
pspnr LIKE proj-pspnr,
END OF t_pr_ps_rpsco.
DATA: it_pr_ps_rpsco TYPE STANDARD TABLE OF t_pr_ps_rpsco WITH HEADER LINE,
wa_it_pr_ps_rpsco TYPE t_pr_ps_rpsco.
TYPES: BEGIN OF i_copy,
include above type ( t_pr_ps_rpsco )
projn LIKE afvc-projn,
vornr LIKE afvc-vornr,
pspel LIKE aufk-pspel,
aufnr LIKE aufk-aufnr,
END OF i_copy.
how to add my above type into below.
Rgds,
sudeer.Hi Kumar,
You can do this way.
types: begin of t_pr_ps_rpsco,
pspnr1 like prps-pspnr,
posid like prps-posid,
abgsl like prps-abgsl,
pspid like proj-pspid,
pspnr like proj-pspnr,
end of t_pr_ps_rpsco.
data: it_pr_ps_rpsco type standard table of t_pr_ps_rpsco with header
line,
wa_it_pr_ps_rpsco type t_pr_ps_rpsco.
types: begin of i_copy,
pr_ps_rpsco type t_pr_ps_rpsco,
projn like afvc-projn,
vornr like afvc-vornr,
pspel like aufk-pspel,
aufnr like aufk-aufnr,
end of i_copy.
Regards
Raja. -
I am having some trouble converting some data from type P to type C. I am only new to abap so please bear with me
I have two variables
DATA gv_shifttime TYPE p.
DATA lv_shifttime type c.
I do some calculations and put the result in gv_shifttime.
When I run the code
lv_shifttime = gv_shifttime.
all I get in lv_shifttime is *Hi,
So why do you want to convert a packed type into character type? Can't you display directly, i mean to say, can't you directly add it to commentery directly?
Or is there any necessicity that you need to convert it in character format?
Also, when you define character type variable you need to spcify length, otherwise it takes default length which is 1 in this case.
You need to define your variable as
DATA lv_shifttime type char10.
It defines variable lv_shifttime with length 10.
Thanks,
Archana -
How to Transfer IDoc Type to Data Type in XI
Dear All,
I am working on scenario to transfer data(IDoc) from SAP System to Non SAP system through XI.
While Defining "Data Type" in XI i want to create Data Type as of IDoc type(CREMAS05).There is any direct method to import IDoc type into "Data Type" in XI.
thanks,
RPHi Rp,
External definitions enable you to import WSDL, XSD, and DTD documents to the Integration Repository so that you can access the message definitions they contain as external messages.
If a description of the message structure already exists in one of the above formats, you can use it in the Integration Repository by importing it as an external definition rather than re-entering it manually using the data type editor.
Prerequisites
The document to be imported must conform to the WSDL, XSD, or DTD standard.
Chk out all the details + how to import Ext Def:
http://help.sap.com/saphelp_nw04/helpdata/en/26/9e97b0f525d743882936c2d6f375c7/content.htm
Also refer...
Connection Using Adapters and Imported Interfaces
http://help.sap.com/saphelp_nw04/helpdata/en/4a/576d219c340844aaa12ce9bbc2c3ee/frameset.htm
Incase u want to chk out the details of Idoc scenario.....
IDoc to File:
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
Handling different partners for IDoc:
/people/sravya.talanki2/blog/2005/08/17/outbound-idocs--work-around-using-party
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/file%2bto%2bidoc
Hope this was helpful..
kanan -
Convert variable type f into variable type p decimals 2
Hi,
How can i convert a type f variable into a type p decimals 2 variable?
I'm trying to make this division:
var type f.
var1 type p decimals 2
var = 50 / 100.
the result is:
var = 5.0000000000000000E-01
if i do
move var to var1.
the result is:
var1 = 0.01 ???
can anyone tell me what i'm doing wrong?DATA: var type f,
var1 type p decimals 2.
var = 50 / 100.
WRITE:/ var.
move var to var1.
WRITE:/ var1.
Result is: 0.50
I don't see what's your problem...
Greetings,
Blag. -
Converting XML string to ABAP types
Hello,
I am having a requirement where i wanted to parse incoming XML string and i checked few of examples of CALL TRANSFORMATION id.
but whatever examples i checked those were simple transformation with no hierarchy.
My source structure
<record>
<firstname>XYZ</firstname>
<position>Testposition</postion>
</record>
and i used
CALL transformation id
source xml lv_xml
result firstname = lv_firstname position = lv_position.
but lv_firstname and lv_position were blank. any idea whether it can be acheived through such method?
thanks in advance.
regards
rajeevHello Rajeev,
Try using the following simple transformation
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="record"/>
<tt:template name="record">
<record>
<firstname>
<tt:value ref="record.firstname"/>
</firstname>
<position>
<tt:value ref="record.position"/>
</position>
</record>
</tt:template>
</tt:transform>
In your code you could define a structure like the following:
TYPES: BEGIN OF record,
firstname TYPE char50,
position TYPE char50,
END OF record.
And now you could use the CALL TRANSFORMATION in your code to convert the xml string into the structure and visa-versa.
CALL TRANSFORMATION zcl_test_rec
SOURCE XML lv_string
RESULT record = ls_test.
Where lv_string holds the xml as a string and ls_test is defined as a structure of type record (defined above).
Hope this helps.
Thank you,
Ramneek -
I want to know what I need and then how to take a pdf form I created in word and add the blue boxes so that anyone can type into my form
Hey john@adobe,
Could you please specify how exactly have you created your form.
You might need to have Acrobat installed on your computer to convert a word document to PDF.
Do you have Acrobat installed? If yes, what version? If no, then please try using the trial version of Acrobat DC (latest version) and access its features:
Download Adobe Acrobat free trial | Acrobat Pro DC
Also, let me know what kind of blue boxes are you talking about.
If you want others to edit your PDF form, then you need to make it a fillable form by choosing 'Form Editing' option from Tools pane.
Let me know more on this so that I can help you out.
Regards,
Anubha -
Oracle 10.2.0.5.0
Using Pl/SQL Developer
Hi I'm new to collections, object types etc, so I aologize for any poor wording and missed concepts...
I need to output a ref cursor from my package (for a summary report in SQL Server Reporting Services 2005). The summary report has two fields that come from the database table and 5 calculated fields. My idea for creating the ref cursor is as follows:
1. Define an object type at the schema level
2. Define a table (collection) type at the schema level
3. Define a ref cursor at the package level
4. Using dynamic SQL create a sql statement creating virtual columns for the 5 calculated fields
5. Fetch cursor with dynamic sql into object type one record at a time
6. Calculate the other five field values and update the object for each record processed
7. Add the object 'record' to the table (collection) after each record is processed
8. After the fetch is complete, convert the table to a ref cursor for returning to my application
Here is what I have so far. I have cut out several of the calculated fields for simplicities sake. It is not complete and I don't know how to fetch the database row into the object, nor convert the collection to a ref cursor.
Any help would be greatly appreciated.
create or replace type dlyout.srvCtr_sum_rec_type as object (
zoneNo number,
zonetx varchar2(15),
distNo varchar2(4),
distTx varchar2(30),
numOccr number,
MEError varchar2(1));
create or replace type dlyout.srvCtr_sum_tbl_of_recs is table of srvCtr_sum_rec_type;
CREATE OR REPLACE PACKAGE DLYOUT.REPORTS_PKG is
TYPE CUR IS REF CURSOR;
PROCEDURE testABC(startDate IN date,
endDate IN date,
startTime IN varchar2,
endTime IN varchar2,
zoneNo IN dlyout.loc.zone_no%type,
distNo IN dlyout.loc.dist_cd%type,
CUROUT OUT CUR);
END;
CREATE OR REPLACE PACKAGE BODY DLYOUT.REPORTS_PKG IS
PROCEDURE testABC(startDate IN date,
endDate IN date,
startTime IN varchar2,
endTime IN varchar2,
zoneNo IN dlyout.loc.zone_no%type,
distNo IN dlyout.loc.dist_cd%type,
CUROUT OUT CUR) as
startDateTimeStr varchar2(10) := to_Char(startDate, 'MM/DD/YYYY') ;
endDateTimeStr varchar2(10) := to_Char(endDate, 'MM/DD/YYYY');
startDateTime date := to_date(startDateTimeStr || ' ' || startTime, 'MM/DD/YYYY HH24:MI:SS');
endDateTime date := to_date(endDateTimeStr|| ' ' || endTime, 'MM/DD/YYYY HH24:MI:SS');
distClause varchar2(1000);
sqls varchar2(2000);
zoneClause varchar2(1000) :='';
idx number :=0;
curSrvCtr cur;
srvCtrRec srvCtr_sum_rec_type;
srvCtrTbl srvCtr_sum_tbl_of_recs :=srvCtr_sum_tbl_of_recs();
BEGIN
if zoneNo <> 9999 then
zoneClause := ' and zone_no member of dlyout.reports_common_stuff_pkg.convert_to_collection(zoneNo)';
end if;
if distNo <> '9999' then
distClause := ' and dist_cd member of dlyout.reports_common_stuff_pkg.convert_to_collection(distNo) ';
end if;
sqls := 'select distinct l.zone_no zoneNo, l.zone_tx zoneTx,
l.dist_cd distCd , l.dist_tx distTx, 0 numOccr, '''' MEError
from dlyout.loc l
where l.ts between :startts and :endts ' ||
zoneClause ||
distClause ||
' order by l.zone_no, l.dist_tx ';
open curSrvCtr for sqls using startDateTime, endDateTime;
LOOP
FETCH curSrvCtr INTO srvCtrRec; --ORA:00932 inconsistent datatype expected - got -
EXIT WHEN curSrvCtr%NOTFOUND;
--call other functions to get calculated fields
srvCtrRec.numOccr := dlyout.reports_common_stuff_pkg.Num_Loc_Exc_Mom(startDateTimeStr, endDateTimeStr, starttime, endTime, srvctrRec.distno);
srvCtrRec.MEError := dlyout.reports_common_stuff_pkg.ME_Error(startDateTimeStr, endDateTimeStr, starttime, endTime, srvCtrRec.distNo, null);
dbms_output.put_line(srvCtrRec.distTx || ' ' || srvCtrRec.numoccr|| ' ' || srvCtrRec.MEError);
end loop;
end testABC;
END;
Then I need to add the object to the table. Something like this?
-- add object 'record' to table
srvCtrTbl.extend;
srvCtrTbl.last := srvCtrRec;
Then I am not sure how to do the cast to get the table to a ref cursor. Something like this?
open curout for SELECT *
FROM TABLE (CAST (srvCtrTbl AS srvCtr_sum_tbl_of_recs))
ORDER BY zoneNo, distTx;Ok, so after more research if seems that in 10.2 you cannot assign an object (SQL) type to a ref cursor (PLSQL). SO i changed my direction and used a global temp table - created at the schema level.
Create global temporary table dlyout.srvCtr_summary (
zoneNo number,
zonetx varchar2(15),
distNo varchar2(4),
distTx varchar2(30),
numOccr number,
MEError varchar2(1)
) on commit delete rows;Here is what the procedure looks like now.
PROCEDURE testABC(startDate IN date,
endDate IN date,
startTime IN varchar2,
endTime IN varchar2,
zoneNo IN dlyout.location.zone_no%type,
distNo IN dlyout.location.dist_cd%type,
CUROUT OUT CUR) as
startDateTimeStr varchar2(10) := to_Char(startDate, 'MM/DD/YYYY') ;
endDateTimeStr varchar2(10) := to_Char(endDate, 'MM/DD/YYYY');
startDateTime date := to_date(startDateTimeStr || ' ' || startTime, 'MM/DD/YYYY HH24:MI:SS');
endDateTime date := to_date(endDateTimeStr|| ' ' || endTime, 'MM/DD/YYYY HH24:MI:SS');
distClause varchar2(1000);
sqls varchar2(2000);
zoneClause varchar2(1000) :='';
curSrvCtr cur;
--Still need the PLSQL record type to put in the cursor for the dynamic SQL
type srvCtr_sum_rec_type is record (zoneNo dlyout.location.zone_no%type,
zonetx dlyout.location.zone_tx%type,
distNo dlyout.location.dist_cd%type,
distTx dlyout.location.dist_tx%type,
numOccr number,
MEError varchar2(1));
srvCtrRec srvCtr_sum_rec_type;
BEGIN
--create clauses for dynamic sql by calling other functions
if zoneNo <> 9999 then
zoneClause := ' and zone_no member of dlyout.reports_common_stuff_pkg.convert_to_collection(zoneNo)';
end if;
if distNo <> '9999' then
distClause := ' and dist_cd member of dlyout.reports_common_stuff_pkg.convert_to_collection(distNo) ';
end if;
--here is the dynamic sql
sqls := 'select distinct l.zone_no, l.zone_tx,
l.dist_cd , l.dist_tx, 0, 0,
0, 0, ''''
from dlyout.location l
where l.enrgz_ts between :startts and :endts ' ||
zoneClause ||
distClause ||
' order by l.zone_no, l.dist_tx ';
open curSrvCtr for sqls using startDateTime, endDateTime;
LOOP
--fetch in part of the record
FETCH curSrvCtr INTO srvCtrRec;
EXIT WHEN curSrvCtr%NOTFOUND;
--do the calculations to get the other field values
srvCtrRec.numOccr := dlyout.reports_common_stuff_pkg.Num_Loc_Exc_Mom(startDateTimeStr, endDateTimeStr, starttime, endTime, srvctrRec.distno);
srvCtrRec.MEError := dlyout.reports_common_stuff_pkg.MEC_Error(startDateTimeStr, endDateTimeStr, starttime, endTime, srvCtrRec.distNo, null);
dbms_output.put_line(srvCtrRec.distTx || ' ' || srvCtrRec.numoccr|| ' ' || srvCtrRec.MEError);
--add record to GTT
insert into dlyout.srvCtr_summary(zoneNo, zoneTx, distNo, distTX, numOccr, MEError )
values(srvCtrRec.zoneNo, srvCtrRec.zoneTx, srvCtrRec.distNo, srvCtrRec.distTX, srvCtrRec.numOccr, srvCtrRec.MEError);
end loop;
--open GTT and return ref cursor to app
open curout for SELECT *
FROM srvCtr_summary
ORDER BY zoneNo, distTx;
end testABC; -
Convert TYPE string to TYPE p in a UNICODE system
Hi-
I've got a string that contains an amount and I want to convert it into a TYPE p in my program to store as a proper amount in the database.
I can't do a simple move or use FMs like HMRC_AMOUNT_STRING_CONVERT as I am in a Unicode system and it errors if I try these.
How can I do it.
Example.
parameters p_amount type string.
start-of-selection.
data l_amount TYPE p decimals 2.
MOVE p_amount TO l_amount.
=>compile error.Hi Tristan.....
IN PARAMETERS we ca have only have predefined data
The data types valid for parameters include The built-in ABAP types c, d, i, n, p, t, and x
You cannot use data type F, references and aggregate types.
But you are using type STRING which is not allowed.
so you are getting a compiler error.
Suresh..... -
Hello,
I need to convert a variable of type P into a variable of type C.
I tried already to just assign it:
DATA:
varc type c,
varc type p.
varp = 1000.
varc = varp.
But then varc has always * as value.
Then I tried the command unpack which should do it according to SAP help:
UNPACK varp TO varc.
But then my varc always has 0 as value.
Any suggestions?
Thanks
AnneHi Anne,
Check this link
http://help.sap.com/saphelp_webas620/helpdata/EN/fc/eb3434358411d1829f0000e829fbfe/content.htm
Try MOVE statement and check.
Hope this helps you
Edited by: Harsh Bhalla on Jan 19, 2010 10:43 PM -
Making/converting ttf 2 otf Open type? can help me anyone in this matter?
I am new user concerning open type fonts. I don't know about much features. But after some learning I have produced a Unicode Basic Latin & Arabic supported ttf unicode font
with FontCreator 6.0. I have added Open Type Arabic features by MS Volt. My font is working correctly with Arabic & Basic Latin features as a TTF Unicode Font. But I want that
my font work as Open Type & its has icon as that of an Open Type TTF font.
Please guide me that can I convert my this ttf font into Open Type font OR I have to remake the font from scratch. If I have to make it from scratch please guide that What are
basic features tables of Open Type and how can I add them? I have downloaded Adobe FDK but I cannot uderstand how to use it. What is difference between Open Type TTF & Open Type
CFF fonts?
I will be very thankful to you if you provide me basic step by step instructions in this regard.
ik_sajid70I am new user concerning open type fonts. I don't know about much features. But after some learning I have produced a Unicode Basic Latin & Arabic supported ttf unicode font
with FontCreator 6.0. I have added Open Type Arabic features by MS Volt. My font is working correctly with Arabic & Basic Latin features as a TTF Unicode Font. But I want that
my font work as Open Type & its has icon as that of an Open Type TTF font.
Please guide me that can I convert my this ttf font into Open Type font OR I have to remake the font from scratch. If I have to make it from scratch please guide that What are
basic features tables of Open Type and how can I add them? I have downloaded Adobe FDK but I cannot uderstand how to use it. What is difference between Open Type TTF & Open Type
CFF fonts?
I will be very thankful to you if you provide me basic step by step instructions in this regard.
ik_sajid70 -
Convert xfaform variable to document type
I have a simple requirement to convert the xfaForm type which is used to invoke the process in task manager to document type varibale.
The form developed is not following any xsd schema. But I want to read value assign into various form feild during the various operation of the process.
Is there any way by wchich I can do it. My intention to convert it into document type so that I can use export data and get the desire values but I am very much stuck up with the conversion from xfaForm to document type itself.I tired both the options as described below.
I have the following the structure of XDP form1/subform1/TextField1
My Process having two components setValues and Variable Logger.
Two varibales defined: myForm of Type xfaForm and myString of type String
In the set value operation I tried reading and assigning the value of textfield1 as suggested in the following 2 manner.
In setValue operation used
1)Location /process_data/@myString Expression /myForm/object/data/datasets/data/form1/subform1/TextField1
2)Location /process_data/@myString Expression /myForm/object//data/TextField1
Result in the varible logger I always get the value of myString as null.
Please suggest if I am doing anything wrong. -
is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?
No
-
Making a text box expand as you type into it?
I was wondering if it is possible to make a text box (or any kind of box) expand as you type into it. Currently the box does not have a caption, I simply want to allow the value box to expand as i type into it. It would also be great if it would expand to another page...does anyone know if this is possible and if so how can i do it?
Any help would be greatly appreciated and, yes, that is a mess x about 17. The good news is I didn't design it -- the bad news is I got tagged to try and fix it.
I'll try to answer in order:
You haven't used any subforms so it's not going to work as-is.
I don't think whoever did the initial form knew about the subform issue so no provisions made for them.
I won't have time to look at it closely until tonight. Some questions/comments in the meantime:
Do you really need 2 master pages - does that block need to be at the bottom of each page? Or is it just supposed to follow everything else.
the information is to be on the bottom of every page -- clients/workers need to sign each page to prove they have read the information
You've used tables to do a lot of the layout - probably not a good idea.
if we need to dump the tables, that's fine - I looked at the 7_Questions_Flowing.pdf from another thread and I can make it work
the way it needs to with the information in a header but they WANT it as a footer.
You've made the Content Area the full size of the page, better to size it what you want your margins to be.
ok, that should be the easy fix of the batch
You have no master subform (or any at all for that matter...)
my problem was I couldn't find a way to add a master subform that didn't give me that message. If I couldn't get that
one to work without the error message then none contained within would either ??
Maybe you are looking for
-
CRASH "Not enough memory to create clipboard. This should never happen."
CRASH Error message: "Not enough memory to create clipboard. This should never happen." What the F??? SvK
-
HAI (Home Arch Install) - install packages without root account
HAI, or Home Arch Install, can "install" and run Arch Linux programs from your normal user account. (Even if you don't run Arch Linux at all - see the config file.) HAI's design is heavily inspired by Zero Install, but it uses Arch Linux packages ins
-
I saw this somewhere...but the brain is drying up! When you create a form with LCD and someone opens that form with the Acrobat Reader, a function is automatically executed. What is the name of that function and how do I get access to it? Conversely,
-
How to call a VI front panel using Menu on anothe VI
I want to create a VI Which will have menu to call another VI frontpanel at the run time is it possible to call another VI frontpanel using the LAbVIEW version 7.0 please mail me at [email protected]
-
Hp laser jet m1005 mfp is in initializing state not coming to ready how can i solve it
hp laser jet m1005 mfp is in initializing state not coming to ready how can i solve it