Any Function Moduel Available to validate date
Hi,
I am having input field in 10 digit charecter format in BDC. I would like validate the date. Input date will in the mm/dd/yyyy format.
Regards
Chandra Reddy
Hi again,
1. The date will always be in the format
mm/dd/yyyyy
2. This format will be fixed
(independent of the user settings in r/3)
3. If thats the case, then
we can extract the year, month, date
from this character field (mm/dd/yyyy)
and check if date is ok or not.
4. Just copy paste.
(enter date on screen (in mm/dd/yyyy) format,
it will give message if ok / not ok.
5.
report abc.
data : DATE1 TYPE SY-DATUM.
MM/DD/YYYY FORMAT
PARAMETERS : MYDATE(10) TYPE C DEFAULT '08/15/2006'.
CONCATENATE MYDATE6(4) MYDATE0(2) MYDATE+3(2) INTO DATE1.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = DATE1
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE :/ 'INVALID DATE'.
ELSE.
WRITE :/ 'VALID'.
ENDIF.
regards,
amit m.
Similar Messages
-
Is there any Function module available for GR IR for purchase order
Hi
Is there any function module available in SAP to get the list of Goods Received and Invoice Reciept for a purchase order.
One way to create a custom fuction to fetch the details from MSEG and BKPF.
Can somebody suggest a better solution.
Thanks in advance.
Ruhi HiraWhich table in BAPI_PO_GETDETAILS exactly has these information ?
PO_HEADER_TEXTS
PO_ITEMS
PO_ITEM_ACCOUNT_ASSIGNMENT
PO_ITEM_SCHEDULES
PO_ITEM_CONFIRMATIONS
PO_ITEM_TEXTS
PO_ITEM_HISTORY
PO_ITEM_HISTORY_TOTALS
PO_ITEM_LIMITS
PO_ITEM_CONTRACT_LIMITS
PO_ITEM_SERVICES
PO_ITEM_SRV_ACCASS_VALUES
RETURN
PO_SERVICES_TEXTS
EXTENSIONOUT
NFMETALLITMS
Regards
Ruhi Hira -
Is there any function module to convert the date format
Dear ABAPers,
Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
Thanks & Regards,
Ashok.hi,
create custom function module or copy the below code in the report ..and use it
the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
""Local interface:
*" IMPORTING
*" VALUE(DATE) LIKE SY-DATUM
*" EXPORTING
*" VALUE(FORMATTED_DATE)
*" EXCEPTIONS
*" INVALID_DATE
TABLES: TTDTG.
DATA: BEGIN OF T_DATE,
YYYY(4) TYPE C,
MM(2) TYPE C,
DD(2) TYPE C,
END OF T_DATE.
DATA: DAY(3) TYPE N.
DATA: VARNAME LIKE TTDTG-VARNAME.
IF DATE IS INITIAL.
CLEAR FORMATTED_DATE.
EXIT.
ENDIF.
check document date format
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = DATE
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1.
IF SY-SUBRC NE 0.
RAISE INVALID_DATE.
ENDIF.
MOVE DATE TO T_DATE.
CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
WRITE T_DATE-DD TO DAY.
CONCATENATE DAY ',' INTO DAY.
CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
SEPARATED BY SPACE.
ENDFUNCTION.
the output is :--Convert a DATE field into a full format date eg. March 23, 2000
Regards,
Prabhudas -
Is there any function module to download abap data to a word document?
Hi all,
I know that the downloading to word can be done by ole automation...But is there any function module in sap which can do the same....?? please let me know your expert comments.......Hello Rich,
I have tried the function module word_ole_formletter ..but i am facing a problem...once i execute the program i can see that the data is coming to word document but it is coming in read only mode and again reverting back to a blank document as was befor the data is coming to word document..Can you suggest where i am going wrong...Also I tried to debug the function module but the break point is not coming to the function module .... -
Any function module available for...
hi all,
i need a function module to do a goods receipt for the PO using
movement type 161,
movement ind B,
goodsmvt code '01'.
i couldnt able to post using BAPI_GOODSMVT_CREATE as iam getting
'NO GOODS RECEIPT POSSIBLE FOR PO XXXXXXXX XXXXX'.
So is there any function module other than bapi to do a goodsmvt with my requirements.
Thanks in advance,
Prem.hi,
the code i use is,
loop at gt_final into gs_wa_final.
gt_item-move_type = '161'.
gt_item-entry_uom = gs_wa_final-meins.
gt_item-stge_loc = gs_wa_final-lgort.
gt_item-entry_qnt = gs_wa_final-menge.
gt_item-entry_uom_iso = gs_wa_final-meins.
gt_header-ref_doc_no = gs_wa_final-submi.
gt_item-base_uom = gs_wa_final-meins.
gt_header-doc_date = gv_last_date.
gt_header-pstng_date = sy-datum.
gt_item-ind_propose_quanx = 'X'.
gt_item-serialno_auto_numberassignment = 'X'.
gt_item-material = gs_wa_final-matnr.
gt_item-plant = gs_wa_final-werks.
gt_item-po_number = gs_wa_final-ebeln.
gt_item-po_item = gs_wa_final-ebelp.
gt_item-mvt_ind = 'B'.
append gt_item.
clear gt_item.
*call bapi goodsmvt create to do the gr
set update task local.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gt_header
goodsmvt_code = gt_bapigm_code
importing
goodsmvt_headret = gs_headret
tables
goodsmvt_item = gt_item
goodsmvt_serialnumber = gt_serialno
return = gt_return.
call bapi_transaction_commit to commit if success
if gt_return-type <> 'E'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
else.
call function 'BAPI_TRANSACTION_ROLLBACK'.
endif.
After executing iam getting an error mess in gt_return[]
'NO GOODS RECEIPT POSSIBLE FOR PO XXXXXXXXXX XXXXX'
i cant understand y the function module is returning this error message,
can any one help me in this issue,
Thanks in adavance,
Prem. -
Any function module available for updation of Configuration data
Hi experts,
i want to know the function module which updates the configuration data.Please help me regarding this,its very urgent..I have some configuration data which needs to be updated .This data is present in the item level configuration data..
Please help me ...
Regards,
NagarajHi Nagaraj
I assume that one of the Sales document(SO/DO/Billing/Shipping,etc) has this custom field YF_ZZZ_STATUS.
If so, this custom field would be available in any one of sales tables (VBAK/VBAP/VBRk/VBRP/LIKP/LIPS, etc)
You have to find out where exactly this field is existing.
If this field is avilable in sales document screen, simply you can write one BDC code to update this field at any one sales userexit.
For example if you want to update this field at the time of saving sales order, then use MV45AFZZ include..there you will find userexit_save_document (FM). There you can write simple BDC code OR direct update query to update particular table.
NOTE: YOU CAN NOT FIND OUT ANY FM TO UPDATE CUSTOM FIELDS (IN CONFIGURATION AND DEVELOPMENT)
Thanks
Bala -
Is there any function module to get the data from st06?
Hi,
I'm new to this forum.
I would like to know if there is a way (maybe some function modules) to collect information like system architecture, and databases as displayed in transaction st06?
I would like to call it from external program in order to view part of the data available in st06.
Thanks,
Erez Gordon.have a look at function group SMON.
Not sure if these are remote enabled, otherwise create a wrapper function module (RFC).
Edited by: Micky Oestreich on Dec 11, 2008 9:37 AM -
Is there any function Module available?
Hi,
Could you please tell me whether the function module is available for the scenario below.
If we pass RFC Name to the function module it should return success or failure message for the particular target server maintained in the RFC.
We need to check with the help of RFC we just need to know whether the particular target server is running fine or not?
Please help me in this regard.
Thanks & Regards,
SwathiHi Swathi,
Actually there is a program available that can check an RFC destination (regardsless of what type it is). In fact within transaction SM59, behind the "Connection Test" button this report is runned and the results shown on screen.
I have made a small ABAP objects method to encapsulate this.
This method has an interface and ABAP code:
-->INTERFACE:
import: RFCDEST TYPE RFCDEST (OPTIONAL) - Destination to test
change: REACHED TYPE BOOLEAN - Is destination active?
change: DETAILS TYPE RFCSI - RFC system info (see FM RFC_SYSTEM_INFO)
-->ABAP CODE:
METHOD reach_rfc_destination .
* Test RFC destination connection (all types)
DATA:
loc_rfcsi TYPE rfcsi.
* Answer is unknown at the start of the method
CLEAR:
loc_rfcsi,
reached. " In this way it is always set to GC_FALSE
* Only if an RFC Destination is supplied
IF rfcdest IS SUPPLIED
AND rfcdest NE space.
* Clear memory area before call
* so no details about previous RFC test calls do exist
FREE MEMORY ID '%_rfctest'.
* Remote test call
SUBMIT rsrfctes
WITH dest = rfcdest AND RETURN. "#EC CI_SUBMIT
* Collect possible RFC information
IMPORT rfcsi TO loc_rfcsi FROM MEMORY ID '%_rfctest'.
* Reached
IF loc_rfcsi IS INITIAL.
* Answer is not reached
reached = gc_false.
ELSE.
* Answer is reached
reached = gc_true.
details = loc_rfcsi.
ENDIF.
ENDIF.
* Housekeeping
CLEAR:
loc_rfcsi,
sy-subrc.
ENDMETHOD.
This will supply you with gc_false (=constant value with space) or with gc_true (=constant value with X).
When gc_true the destination is OK and reachable.
Regards,
Rob. -
Any Function Module to translate variable data in smartform
Hi All,
I am working with smartform.
My requirement is, when user logins with Japan language.
then all the data ( text template and variable data ) should be in Japan .
By using SE63 ,i can translate only text data. How about the variable data in smartform?
Please suggest any solution.
Regards,
KishanHope you are passing the variable from print program. If not then do the same. and in the print program do the below thing.
wf_spras = sy-langu.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTP
EXPORTING
input = wf_spras
IMPORTING
output = wf_language.
SET LANGUAGE wf_language.
wa_control_parameters-langu = wf_spras.
PS : wa_control_parameter , you pass through control_parameters, in to the SMARTFORM calling FM .
Make sure that the data, which u fill into the variable you are talking about in maintained in the log on language also. -
Any function module to calculate delivery date?
Hello all,
I think BAPI_PO_CREATE doesn't have ability to determine the delivery date by itself and needs delivery date be fed to it instead. I have a requirement to create a STO with a feed from a 3rd party system that doesn't specify the delivery date at the receiving plant. Could anyone help me identify a function module that returns the delivery date?
Thanks,
RohitHi Rohit,
It is the same function module that is also called by the form MEPO_DEFAULT_DELIVERY_DATE. I thought that it would be better to call the whole form, since it performs more checks than just calling MD_CHECK_DELIVERY_DATE.
MD_CHECK_DELIVERY_DATE is called with E_DISPODATUM = sy-datlo, i.e. the local date of the user.
BR
Raf -
Any function module available to create return order?
Hi Experts,
Is there any Fucntion Module to create a return order? In my scenario, I want to make an RFC call to this FM from CRM system and create a return order.
Is this scenario possbile?
Waiting for your inputs!
Thanks and Regards,
RohitHi Rohit,
As we all know that we can create standard orders by using this function module: IDOC_INPUT_ORDERS
We can as well create returns order. We can copy the above FM into "Z" customize it as per requirements and use the same in RFC call.
With this i think you can create returns order in the background.
Hope this helps
Regards,
Syed Nasir -
Any Function Module to get date by passing week and year
Hi,
Is there any Function Module available to get date by passing week and year. For example, Week 24, Year 2005 and you get the date.
Regards,
MiraWEEK_GET_FIRST_DAY
pass 'YYYYWW' (200524) to WEEK parameter it will give you the week start date
Raja -
Any function module to get Stock and value of material on a given date?
Hi Friends
Is there any function module available to get Stock/and value of material on a given date?
Thanks
HarishSorry I didn't elaborate the requirement.
I am asked to develop a custom report for inventory management. For range of materials it is required to display stock and value on particular date and GRs GIs for the range.
I need function module to use in Zreport.
Thanks
Harish -
Hi all,
I am receiving date (day,month,year) from the file.Now i want to validate this date .
Please let me know if any function module available for this.
Regards,
ShobanHI Shoban,
u can check the date with the FM K_POSTING_DATE_CHECK
or else if u didnt get means just search in se37 by typing DATE or CHECK k u can fine lot of FM so check there k
or else individual fields u can check i mean date between 1 to 31 and month in between 1 to 12 like year also
THX -
Function module to fine closest date among given date
Hi All,
Is there any function module to find closest date among given dates?
Thanks in advanceHi
I think there is no FM module available which will satisy this requirement...
But You can develope one ZFM or You can write a code for it...
Logic will be
Check out below code...
PARAMETERS : P_DATE TYPE SY-DATUM DEFAULT '20090909'.
DATA : BEGIN OF WA_ITAB,
DATE TYPE SY-DATUM,
END OF WA_ITAB.
DATA : ITAB LIKE STANDARD TABLE OF WA_ITAB.
DATA : IND TYPE SY-TABIX,
IND2 TYPE SY-TABIX,
IND3 TYPE SY-TABIX,
DATE1 TYPE SY-DATUM,
DATE2 TYPE SY-DATUM,
DIFF1 TYPE I,
DIFF2 TYPE I,
UTTER_CLOSE TYPE SY-DATUM.
CLEAR : WA_ITAB, ITAB[].
WA_ITAB-DATE = '20090824'.
APPEND WA_ITAB TO ITAB.
CLEAR : WA_ITAB.
WA_ITAB-DATE = '20090901'.
APPEND WA_ITAB TO ITAB.
CLEAR : WA_ITAB.
WA_ITAB-DATE = '20090912'.
APPEND WA_ITAB TO ITAB.
CLEAR : WA_ITAB.
WA_ITAB-DATE = '20090930'.
APPEND WA_ITAB TO ITAB.
CLEAR : WA_ITAB.
WA_ITAB-DATE = '20091011'.
APPEND WA_ITAB TO ITAB.
CLEAR : WA_ITAB.
WA_ITAB-DATE = P_DATE. " P_DATE ==> Your Key Date
APPEND WA_ITAB TO ITAB.
CLEAR : WA_ITAB.
SORT ITAB BY DATE.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING DATE.
READ TABLE ITAB INTO WA_ITAB WITH KEY DATE = P_DATE.
IF SY-SUBRC = 0.
IND = SY-TABIX.
ENDIF.
IND2 = IND - 1.
IND3 = IND + 1.
READ TABLE ITAB INTO WA_ITAB INDEX IND2.
IF SY-SUBRC = 0.
DATE1 = WA_ITAB-DATE.
ENDIF.
READ TABLE ITAB INTO WA_ITAB INDEX IND3.
IF SY-SUBRC = 0.
DATE2 = WA_ITAB-DATE.
ENDIF.
CLEAR : DIFF1 , DIFF2.
DIFF1 = P_DATE - DATE1.
DIFF2 = P_DATE - DATE2.
IF DIFF1 = DIFF2.
UTTER_CLOSE = DATE1. " or date2 either
ELSEIF DIFF1 > DIFF2.
UTTER_CLOSE = DATE2.
ELSEIF DIFF1 < DIFF2.
UTTER_CLOSE = DATE1.
ENDIF.
WRITE : / 'Key Date ' , P_DATE.
WRITE : / 'Lower Closest Date ' , DATE1.
WRITE : / 'Upper Closest Date ' , DATE2.
WRITE : / 'Utter Close Date based on key date ', P_DATE , ' is ' , UTTER_CLOSE.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
Edited by: ilesh 24x7 on Sep 19, 2009 3:54 PM
Maybe you are looking for
-
Recently I downloaded some new music and now when I try to sync to my iPhone 4S none of the songs i downloaded are syncing to my phone and even some of the songs that were on my phone are not anymore. On iTunes on "On this phone" or whatever the song
-
Unable to retrieve data from repository
Hi All I am new to ATG. I want to create small application where I need to retrieve all the user's first name and last name and display that in index.jsp. I am using MySQL database server. Till date I have created one userRepository.xml file which co
-
CFGrid tag not displaying background color
Hi, My application runs on CF v 4.5 and uses CFGrid tag to display grids. When I run the same code on MX 7, the grid does not display the pale yellow background for the grid as it does on 4.5. Does anyone know how to fix this ? Thanks, Jay M.
-
Open Window Behavior not behaving
Hi, http://www.ekongo.org/presse/Presse.html In the footer, the "multimedia" link should pop a 700 by 500 windows (no toolbar) which contains a flash anim of same size. But as i tested with IE 6.0, safari 4.0.3 and firefox 3.5.3 they all first open t
-
So, come March, with the anticipated arrival of the long awaited and less-rumored iPad 3, I will probably be joining the throngs of people eager to get my hands on and fall in love with another Apple device. But wait! As I mull over the decision to