Function module to change Date from YYYYMMDD to DD.MM.YYYY
Hi
PLease tell me the function module that will convert date from YYYYMMDD to DD.MM.YYYY
Thanks
Hi,
data lv_date1 type sy-datum.
data lv_date2(12).
lv_date1 = '20070123'.
concatenate lv_date16(2) lv_date14(2) lv_date1+0(4) into lv_date2
separated by '.' .
is what you require to do;
now lv_date2 = 23.01.2007.
Also look for conversion routine "CONVERSION_EXIT_PDATE_OUTPUT"
EG: call function CONVERSION_EXIT_PDATE_OUTPUT
exporting input = lv_date1
importing output = lv_date2.
Thanks,
Anitha
Similar Messages
-
Function module to change date format
hi
is there any function module to change date format from 20080318 to 18.03.2008Hi,
Use this FM CONVERT_DATE_FORMAT Convert date from yyyymmdd to ddmmyyyy format
Regards,
Jyothi CH. -
Program or Function module to delete data from Open Hub Destination Table
Hi All,
Can anybody suggest me a Program or Function module to delete data from Open Hub Destination Table.
Thanks & Regards,
Vinay KumarYou can simply goto t-code SE14 mention the open hub destination table and Delete data by clicking on "Activate and Adjust database" with radio button "Delete Data".
Regards,
Arminder -
Any standard function module to read data from a cube
Hi,
I want to read data from a cube say XYZ, into an internal table. Is there any standard function module to do this? If so can anyone plz tell me what change should i make in the function module for my requirement.
Regards
BW Fresher.Hi R,
Try function module 'RSDRI_INFOPROV_READ'
ABAP Report RSDRI_INFOPROV_READ_DEMO contains an example of how the function module can be used.
Udo -
Generic datasource by function module to fetch data from multiple tables?
I'm writing a function module to fetch price, for generic datasource.
At first, extract test is OK. But InfoPackage never stop when loading data to PSA in BW.
And I find the example codes:
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
WHERE CARRID IN L_R_CARRID AND
CONNID IN L_R_CONNID.
ENDIF. "First data package ?
* Fetch records into interface table.
* named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.
There using Cursor to fetch data package by package, and raise exception NO_MORE_DATA to stop the loading process.
Now I fetch data from multiple tables, I don't think I can use Cursor.
Then How can I handle this?
Thanks a lot.Thanks
IF IT_999[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A999 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_999
WHERE
* A~KNUMH = IT_999-KNUMH AND
( ( A~KSCHL = 'ZPRC' AND VKORG = 'Z000' AND VTWEG = 'Z1' ) OR
( A~KSCHL = 'ZPRD' AND VKORG = 'A000' AND VTWEG = 'Y3' ) ) AND
* A~DATBI >= SY-DATUM AND
LOEVM_KO = ''.
SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A999 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_999
WHERE
* A~KNUMH = IT_999-KNUMH AND
A~KSCHL = 'ZPR3' AND A~VKORG = 'I000' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
IF IT_997[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A997 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_997
WHERE
* A~KNUMH = IT_997-KNUMH AND
A~KSCHL = 'ZPRA' AND VTWEG = 'Y1' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
IF IT_996[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A996 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_996
WHERE
* A~KNUMH = IT_996-KNUMH AND
A~KSCHL = 'ZPRB' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
SELECT MATNR "u7269u6599u53F7u7801
MEINH "u4ED3u50A8u5355u4F4Du7684u5907u7528u8BA1u91CFu5355u4F4D
UMREZ "u57FAu672Cu8BA1u91CFu5355u4F4Du8F6Cu6362u5206u5B50
UMREN "u8F6Cu6362u4E3Au57FAu672Cu8BA1u91CFu5355u4F4Du7684u5206u6BCD
FROM MARM
INTO CORRESPONDING FIELDS OF TABLE IT_MARM
FOR ALL ENTRIES IN TP_DATA
WHERE MATNR = TP_DATA-MATNR AND MEINH = TP_DATA-KMEIN.
LOOP AT TP_DATA.
IF TP_DATA-KPEIN NE 0.
TP_DATA-KBETR = TP_DATA-KBETR / TP_DATA-KPEIN.
TP_DATA-KHETR = TP_DATA-KHETR / TP_DATA-KPEIN.
ENDIF.
IF TP_DATA-KSCHL = 'ZPRA'.
* TP_DATA-MEINH = 'ZI'.
* TP_DATA-KSCHL = 'B4'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'CT'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPRB'.
* TP_DATA-KSCHL = 'L0'.
* TP_DATA-MEINH = 'ZI'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPRC' OR TP_DATA-KSCHL = 'ZPRD'.
* TP_DATA-MEINH = 'ZI'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'WZI'.
TP_DATA-KBETR = TP_DATA-KBETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPR3'.
* TP_DATA-KSCHL = 'B2'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ENDIF.
TP_DATA-MEINH = '01'.
MODIFY TP_DATA.
E_T_DATA-MATNR = TP_DATA-MATNR.
E_T_DATA-KSCHL = TP_DATA-KSCHL.
E_T_DATA-KHETR = TP_DATA-KHETR.
E_T_DATA-KBETR = TP_DATA-KBETR.
E_T_DATA-KMEIN = TP_DATA-KMEIN.
E_T_DATA-DATAB = TP_DATA-DATAB.
E_T_DATA-DATBI = TP_DATA-DATBI.
APPEND E_T_DATA.
CLEAR WA_MARM1.
CLEAR WA_MARM2.
ENDLOOP.
Edited by: Shen Peng on Oct 20, 2010 10:09 AM -
BDC program or standard function module to change data in PFCG TCode.
Gurus,
I have programatically change the validity date of SAP security role (TCode PFCG). Are there any standard function module available for this ? If not then does PFCG supports update vida BDC programming ?
Regards,
Rajesh.Cross-posting. Thread locked.
Please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement].
PS: Please clean up / follow up on all your hundreds of unresolved questions. -
Function module to fetch data from table
Hi All,
I want to get the entries from the table 'arfcsstate' for a particular date. Is there a function module to get the same.
Thanks in advance.
Regards,
AnjuHi,
You can use select query
Select * from arfcsstate into <Internal table name>
where date <give ur condition.>
if date is in selection screen than write
date in s_date.
Thanx
Ankur Sharma -
Function Module To Change TIME from GMT to CST
Hello All,
Can anyone tell me if there is any Function Module to convert the TIME from GMT to CST?
RegardsHi Sunil,
use the following code.
DATA :
timestamp like TZONREF-TSTAMPS,
time like sy-uzeit,
date like sy-datum.
The following function module is used to convert the
time and date into GMT timestamp
CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
EXPORTING
i_datlo = sy-datum
i_timlo = sy-uzeit
I_TZONE = 'INDIA'
IMPORTING
E_TIMESTAMP = timestamp.
The following function module is used to convert the
above obtained timestamp to PST timezone date and time.
CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
EXPORTING
i_timestamp = timestamp
I_TZONE = 'CST'
IMPORTING
E_DATLO = date
E_TIMLO = time.
write :/ 'Date and Time at PST zone is ',date, time.
Reward if helpful.
Thanks,
Naveen. -
Function module to read data from a SPO
Hi guys,
Inside a transformation a have a rule, ABAP routine type, in wich I need to read data from a SPO (semantically partitioned object). Is there an ABAP function module or Class that allows to read data from a SPO?
The SPO from wich I need to read the data is DSO based.
Thanks in advance.
David.Hi David,
The normal procedure is using Function Module RSDRI_INFOPROV_READ. However, according to the documentation it only works for DSOs, InfoCubes and MultiProviders.
Could you access as a work-around a MultiProvider? Or use any logic to first determine which PartProvider of the SPO-based DSO or InfoCube is required and then use the Function Module to read the data?
Best regards,
Sander -
Function module to Read DATA from HRP1001
Hi All ,
I am fetching sobid by writing the following Select Query,
<b> SELECT sobid FROM hrp1001 INTO TABLE it_sobid
WHERE otype = c_objtyp_o
AND objid = pr_ounit
AND plvar = c_plnvrsn
AND rsign = c_relshp_b
AND relat = c_relat_963
AND sclas = c_objtyp_s.</b>
is there any Function module to fetch the data from HRP1001 using all the above selection Criteria.
Thanx,
Girish.RH_READ_INFTY_1001
Raja -
Function Module to Read data from ESLH & ESLL
Hi All,
Presently i am working on the Service Purchase Order
I have to get the data from the Service Master tax conditions which is storing in ESLH & ESLL database tables.
So is there any Function Module to get the data.
regards:
Sridhar JHi David,
The normal procedure is using Function Module RSDRI_INFOPROV_READ. However, according to the documentation it only works for DSOs, InfoCubes and MultiProviders.
Could you access as a work-around a MultiProvider? Or use any logic to first determine which PartProvider of the SPO-based DSO or InfoCube is required and then use the Function Module to read the data?
Best regards,
Sander -
Function module to get data from VARI table
Hi All,
thank you for viewing this thread. can anyone help me out in finding a function module which can get data from the VARI table?
thank youHi,
FMs you will require are:
RS_VARIANT_CONTENTS - Values of a variant returned in a table
RS_VARIANT_EXISTS - Checks whether a variant exists for a report
RS_VARIANT_TEXT - Returns short description of variant
RS_VARIANT_VALUES_TECH_DATA - Reads variant parameters of a report
Do search on them for complete details.
Cheers. -
Function module to fetch data from table SETLEAVES
Hi All,
We have a requirement to fetch the data from table SETLEAVES based on the setclass,subclass and group. As the table holds hierarchical data, Please let me know a FM which fetches all the hierarchical data from the table SETLEAVES.
Regards
ShivaTry:
exporting
e_class = '0102'
e_setid = setid
e_kokrs = my_kokrs
e_mandt = sy-mandt
e_master_data = 'XXX'
e_structure = 'X X0200'
e_replace_class = space
e_replace_unit = space
e_suffix = space
e_old_line_level = 1 "l_ol_level
tables
t_nodes = it_ceg_nodes
t_values = it_ceg_values
changing
c_info = c_info
c_overwrite = c_overwrite
exceptions
no_controlling_area = 1
no_chart_of_account = 2
different_controlling_areas = 3
different_chart_of_accounts = 4
set_not_found = 5
illegal_field_replacement = 6
illegal_table_replacement = 7
fm_raise = 8
convert_error = 9
no_overwrite_standard_hier = 10
no_bukrs_for_kokrs = 11
others = 12.
Rob -
Function module to import data from memory
Hi,
I am using the function module 'LIST_FROM_MEMORY' to import data and the LISTOBJECT contains values in raw format.How to convert this to char format?I dont want to use 'DISPLAY_LIST' as I want the values of the parameter 'LISTOBJECT' to be passed to block alv in the calling program.
Please suggest me as to how to do the conversion?
Thanks in advance
VasudhaUse Function Module: LIST_TO_ASCI
Converts the specified list (LIST_INDEX) or the provided list
(LISTOBJECT) to ASCI.
Here, the purely text part of the list is copied line by line to the
prepared internal table (LISTASCI) without any attributes (color, icon,
symbol, ...). There is no line break in this case, i.e. if the internal
table line is not long enough, the list line is truncated.
DATA LISTTAB LIKE ABAPLIST OCCURS 1.
DATA: BEGIN OF ASCITAB OCCURS 1,
LINE(256),
END OF ASCITAB.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES LISTOBJECT = LISTTAB
LISTASCI = ASCITAB.
The provided list (LISTOBJECT) is taken into account only if the
parameter LIST_INDEX = -1 (default). Otherwise, it is ignored.
Hope this helps.
Regards
Vinayak -
Any Function module to get data from ESS leave form
Hi Friends,
I have modified std workflow ws12300111.with 2 levels.
I want to send mail to HOD. In that mail i have to mention details like start date , end date,leave type which is entered into ESS form. I want to retrive that data.
Is there any Fm is available? which wil give ESS data as output.
Plz let m know.
Regards,
ShitalHave you thought about creating attachments in the WF so you can read the form and get data from it.
There's plenty of standard WF examples around of attaching objects to WF's.
Since the ESS action will initiate the relevant workflows you should easily be able to save this data.
BTW If your other question on this WF was answered please close that thread.
Cheers
Jimbo
Maybe you are looking for
-
Hi all, I've been trying to get a semi-complex measure out for over a day now but seem to be going round in circles. Most frustrating is I don't quite understand why one version throws an error, another throws out the wrong number and then whatever y
-
What is the best photo paper 4'x6' for HP Officejet Pro 8500A Plus e-All-in-one Printer?
1.-HP Officejet Pro 8500A Plus e-All-in-One Printer 2.-OS: Windows 7-64 3.-No error messages 4.-No changes have been made 5.-I have been printing in my with old "hp premium plus glossyphoto paper" and getting very dark photos and too much wasted ink
-
To know link b/w PS and MM tables
Hi, I got the link between tables PROJ and PRPS (PS) and link between EBAN,EKBE and ESSR.(MM) I need the link beetween first category (PS) and second category(MM). Can anyone please help me on this regarding? Thanks
-
I recently got a new computer for college. It is a a v.10.7.4, 15 inch, 2.4 GHz processor MacBook Pro, and has gotten all the most recent Software Updates. However, following my iPhoto 9.3 update, I noticed an issue. In Launchpad iPhoto appears twice
-
Related To My SQL Data Base Resultset Coonectivity
Hi I want to open Crystal report through Java 1.5 Using JAVA Beans class. Data Base: My SQL, JDBC connectivity Class Names: CrystalRepoty(For Viewing The Report) Bean Class(WorkinfoDataSourceBean): For Data Base Connectivity When i open the perticula