Function module to split strings
Hi,
I have a string value ' DBTABLE-FIELDNAME'. I need to split this into 2 strings - The first one is the database table name and the second one is the fieldname. So, the character '-' is the point where the split needs to be done. How can this be achieved. Any FM that I could use?
Thanks for your help!
Regards,
Divyaman Singh Rawat
Use FM 'STRING_SPLIT'
REPORT ZEXAMPLE.
DATA: V_HEAD(10), V_TAIL(10).
PARAMETERS: P_STR(20),
P_DEM.
CALL FUNCTION 'STRING_SPLIT'
EXPORTING
DELIMITER = P_DEM
STRING = P_STR
IMPORTING
HEAD = V_HEAD
TAIL = V_TAIL
EXCEPTIONS
NOT_FOUND = 1
NOT_VALID = 2
TOO_LONG = 3
TOO_SMALL = 4
OTHERS = 5.
IF SY-SUBRC EQ 0.
WRITE:/ 'HEAD:', V_HEAD,
/ 'TAIL:', V_TAIL.
ELSE.
WRITE:/ 'ERROR SPLITTING STRING'.
ENDIF.
Regards,
Joy.
Similar Messages
-
Function module to convert string to decimals?
HI,
is there any function module to convert string value in to decimals...string value contains exponent form...or any other way to convert if there is no funtion module..
please let me know...
Thanks
VenkateshLike this?
data: str type string.
data: f type f.
data: p type p decimals 3.
str = '1.2345678900000000E+08'.
f = str.
p = f.
write:/ p.
Regards,
RIch Heilman -
Function module to split integer portion and decimal portion
Hi friends,
Could anyone tell me the function module to split the price variable into two portions one with integer portion and another with decimal portion.....without using the Splitr command....because with this command i have to specify the split delimiter which may be changed with the user profile settings in the production.Hi
Use Functions:
<b>TRUNC</b> Interger part of x
<b>FRAC</b> Decimal part of x
Regards
Raj -
Function Module GUI_DOWNLOAD: Type String Issue
I am working in 4.6C. I have used this Function Module many times in the past without issue, but not at this site. It abends and gives me the error message:
The call to the function module "GUI_DOWNLOAD" is incorrect:
The function module interface allows you to specify only fields
of a particular type under "FILENAME". The field "FNAME" specified here
has a different field type.
Here is the field declaration in the code:
PARAMETER: fname type rlgrap-filename DEFAULT 'C:/New_PO_Format.xls'.
The import parameter in GUI_DOWNLOAD for FILENAME is type STRING. When I double click on STRING in the FM I get "Unable to find a tool to process request". And, TYPE STRING does not exist in the system? I started making a Z version of GUI_DOWNLOAD, but it started giving me headaches because I had to start copying other SAP function modules.
Am I missing something? Or, is there a new and improved version of GUI_DOWNLOAD to use?data : v_file type string.
PARAMETER: fname type rlgrap-filename DEFAULT 'C:/New_PO_Format.xls'.
start-of-selection.
v_file = fname.
use v_file in gui_download parameter.
Thanks
Seshu -
Function Module for splitting(field) in CO02 t-code
Function Module or enhancement for splitting(field) in CO02 t-code Need function module for inserting a value in field(Max No of splits) in Transaction CO02
Message was edited by:
Mohan KumarYou can use this SAP enhancement PPCO0012 to display your own additional
information on a separate tab page in the production order header. You
can also make user fields avaialble for input, change them, and return
the changes to the order header. -
RFC function module - not considering string type parameters
Hi,
i am calling one RFC, this rfc function module is enhanced to have one more import parameter and the type of this parameter is of type "string".
i am passing this value from while calling rfc fm but i can see this value is not being considered here in the target system, i mean the passed value from source system is not seen in the target system.
i read some thing related to rfc restrictions on code pages, is it something to do with that or string type is not allowed??
Please suggest!!!Hi all,
I faced the same problem and solved it ,
You have defined a reference parameter for a remotely called
function module. However, only value parameters are allowed
for this type of module.
Procedure
Change the reference parameter to a value parameter.
Guys pls .don't leave the thread un-asnwered when you solved problem , post the solution it might be useful for others also.
Regards
Krishna Acharya -
Delivery split using function modules or BAPI
Dear All,
I have a requirement that i need to split deliveries with reference to sales order using any function modules or BAPIs. If there are any BAPIs or FMs, let me know the sample coding also. Kindly help me in this regard as soon as possible.
Thks in advance,
Nagarajan
Edited by: abapnag on Jul 1, 2009 10:06 AM
Edited by: abapnag on Jul 1, 2009 10:07 AMCheck BAPI_OUTB_DELIVERY_SPLIT_DEC
Check the Function Module DOC_INPUT_SHP_OBDLV_SPLIT_DEC
and also chk
Re: BAPI
Kanagaraja L
Edited by: Kanagaraja Lokanathan on Jul 1, 2009 10:32 AM -
Need a function module to convert xstring to string in web dynpro applicati
hi,
need a function module to convert xstring to string in web dynpro application other than HR_KR_XSTRING_TO_STRING.
Moderator message: please (re)search yourself first.
Edited by: Thomas Zloch on Nov 17, 2010 5:31 PMHi,
Check the following link:
FM to convert XString to String
Regards,
Bhaskar -
How to search for a string in ALL Function Modules source code
Hello,
I want to search for the string "HELLO" in all FUNCTION MODULES source code(FM, no reports/programs).
Is this possible? How?
Cheers,
Andyhi,
Execute RPR_ABAP_SOURCE_SCAN to search for a string in the code ... Press where-used-list button on the program which takes to the function group or the function module where it is used ..
Regards,
Santosh -
Creating a Function module to send XML Byte String
Hi all,
I have to create a Function module to get XML byte string.The internal table is dynamic coloums based on how many data selected as a importparameter.from the internal; table data I have to create a XML byte string as a output.Pl help me to proceed further.
Thanks in Advance.
RamIf i have your question right you need to convert an internal table of unknown type to an xml string then to a byte string.
data xmlString type string.
data xmlXString type xstring.
call transformation id
source
table = internalTableYouWantToExport
result
xml xmlString.
export xmlString to data buffer xmlXString.
xmlString has the xml of the table and xmlXString contains the byte representation of the string. -
Export and Import Strings To/From Remote Function Modules
Hi,
I am building a Web Application in which the user can enter very large string (unlimited) and we want to store that value in the backend. So i need to create Remote function module which can take large strings, store it in backend and when queired export the strings to the calling web application.
The Remote function module is allowing me to create "Import" and "Export" parameter with type String....but it is not allowing the String type "Table" parameter. I am kind of stuck now as i want to import and export multiple records of type String.
Can anyone suggest an altenative?
Regards,
Kumar.Hi,
To have a table parameter with string type fields, Goto SE11 and under data types, create a structure with the required fields of type string.
Then u can use this structure to refer to the table parameter and declare it as
p_tab like ZSTRUCTURE in the tables tab.
Regards,
Vik -
Problem with String parameters while Calling RFC enabled Function Module
Hi all,
I execute BAPI(RFC enabled Function Module) from my WebDynpro Application and retrieve data from R/3.
To fetch the data I pass few String parameters to BAPI from my Dynpro Application.
Now the problem is that while making this call, the parameters are automatically converted to UpperCase. And I want those parameters in the original case at R/3.
I am not able to find out whether this conversion occurs at Dynpro side or R/3 Side.
Should i configure my BAPI(RFC enabled Function Module) or is there some option on the Dynpro Side to preserve the Case of the String?
Please help me.
Thanks,
DarshilHi Darshil,
I'm not sure whether you have experience with ABAP or you are a Java Programmer, but we cannot set that flag permanently.
Now, if you are saying that the domains are marked with the <i>Lowercase</i> attribute, then it means that the final table field will be capable of holding Case Sensitive data.
I have a hunch that the case-conversion is happenning at the Web-Dynpro side. Or, the application logic converts the string to UPPERCASE explicitly.
By the way, which BAPI are you talking about ?
Regards,
Anand Mandalika. -
Function Module to Determine Split Invoice
Hi,
Is there any function module to determine if the delivery orders will result into a split invoice?
Regards,
MawiHi ,
Look at the following FM.
FI_INVOICE_SPLIT
FM_PPA_SPLIT_INVOICE
FI_WT_ACI_INVOICE_SPLIT
FI_WT_INVOICE_SPLIT
FI_WT_INVOICE_SPLIT_CIFPP
Thanks
Shambhu -
Split string function in oracle ...
Hello,
Little question, is there any split string function available in Oracle.
SQL> select more_info
2 from dba_advisor_findings;
MORE_INFO
Allocated Space:4390912: Used Space:4237403: Reclaimable Space :153509:
select more_info as Allocated_Space,
more_info as Used_Space,
more_info as Reclaimable_Space
from dba_advisor_findings
Allocated_Space Used_Space Reclaimable_Space
4390912 4237403 153509
Thanks,
Manish GuptaI explored more on SUBSTR and INSTR string functions ... and below is the solution
select substr(more_info,instr(more_info,':',1,1)+1,instr(more_info,':',1,2)-instr(more_info,':',1,1)-1) as "Allocated_Space",
substr(more_info,instr(more_info,':',1,3)+1,instr(more_info,':',1,4)-instr(more_info,':',1,3)-1) as "Used_Space",
substr(more_info,instr(more_info,':',1,5)+1,instr(more_info,':',1,6)-instr(more_info,':',1,5)-1) as "Reclaimable_Space"
from dba_advisor_findings;
Allocated_Space
Used_Space
Reclaimable_Space
4390912
4237403
153509
Thanks... -
BAPI/Function module for BATCH SPLIT
Hi,
is there a BAPI/Function module to enter BATCH SPLIT data in an outbound delivery. I used tcode VL02N to create an Outbound delivery(FOR an STO). I can use 'BAPI_DELIVERYPROCESSING_EXEC' to creat an Outbound delivery, but need to know what to use to add BATCH SPLIT data.
Thanks
RajHi Raj,
Check this thread..
Re: Inserting Batch Split Items in Delivery
Cheers
VJ
Maybe you are looking for
-
Can't type onto an existing pdf
I have had an existing PDF emailed to me from someone that I need to work off of and add to, I can't type onto it and I cannot open it in my pages program. Does anyone know how to do this?
-
Hi, I am creating a PDF interactive, The pdf contains text, images, audio and video and must be shown in pc machines and Tablet Devices (Android and Ios) I have tryed to export from indesign cs5 directly to PDF interactive. It works fine for Pc machi
-
Item category determined by sold to account
Hi I have a client who wants to determine the item category in a sales order based on the sold to account. In most cases this client is using the TAS process for all materials, (they have 10000u2019s of materials) but for one specific sold to account
-
Exporting content of my canvas to pdf file.
Hello, I am using flex sdk4.0, I have used mx:canvas in my application. I have added images on canvas using drag and drop mechanism in my application. Now on a button click I want to export the whole content of the canvas to a pdf file. I have g
-
The Header in my home page is truncated. My home page Header is cut off. The header appears in Internet Explorer, but not in Mozilla Firefox 3.6.13. How do make the header display?