Any function module for validation
Hi,
I am new to ABAP.
Can any body tell me whether there is any built in function module for
field validation.
Thanks in advance
Archana
Hi,
u can validate the field values using at selectiion-screen
AT SELECTION-SCREEN
When user enters the values in the fields of selection screen and clicks on execute button, this event gets triggered. This event is basically for checking the values entered by the user for the fields of the selection screen i.e., data validity checking. This event is for entire selection screen. For example:
You are accepting carrid, connid, fldate from user and you dont want to proceed if user enters no value for carrid and fldate. Using AT SELECTION-SCREEN can do this.
Select-options: carrid1 for sflight-carrid,
Connid1 for sflight-connid,
F1date1 for sflight-f1date.
AT SELECTION-SCREEN.
If carrid1-low ne and fldate1-low = .
Error message.
Endif.
In this case, if both the fields are entered blank, then the user gets error message.
Basically, this event is for many fields on selection screen. Usually, it is for the fields which are logically related.
AT SELECTION-SCREEN ON <field>
When you want to check for specific value of a field. For example, carrid should be in the range of LH and SQ. This can be done in this event. Basically, this event is for checking individual fields. You can have many AT selection-screen events in your program (i.e., for each field specified in the Select-Options).
Select-Options carrid1 for sflight-carrid.
AT SELECTION-SCREEN.
If carrid1-low ne LH and carrid1-high ne SQ.
Error message.
Endif.
Here the system will not proceed on entering wrong values.
Regards,
Sruthi
Similar Messages
-
Is there any function module for getting distribution list name
Hi all,
Is there any function module for getting distribution list name when there is same description for two distribution list name.
or
help me how to fetch the correct distribution name when there is same description.
In order to send mails.
Tell me ASAP.
thanks
sagar.http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
list of Fms -
Regarding Function module for validating Date
Hi ,
Cananybody tell me that is there any function mdoule for validating the BGDDA and ENDDA.dear ,
See if you are using it in the input parameter then you dont need to validate .
Beacuse selection option has that option .
secondlly if you are checking internally then is could be done simplly by if condition
regds ankit -
Is there any function module for purchase order change
Hi Experts,
Is there any function module for purchase order change or i need to do new recording in me22n.
Thanks,
SenthilHi
Function module <b>BAPI_PO_CHANGE</b> enables you to change purchase orders. The Change method uses the technology behind transaction ME22N.
Regards,
Viven -
Is their any function module for deleting condition record i am trying
Hi Experts,
Is their any function module for deleting condition record i am trying this way.......
DATA: TABLE (4) TYPE C.
DATA: KNUM LIKE KONH-KNUMH
DATA: K_VEWE LIKE T681-KVEWE VALUE 'A'.
DATA: T681_STR LIKE T681.
DATA: LV_NUM TYPE I.
GET PARAMETERS
PARAMETERS: TABNO LIKE T681-KOTABNR.
PARAMETERS: TESTMODE DEFAULT 'X' AS CHECKBOX.
REFRESH INT_KNUMH.
Select single * from T681 into T681_STR
where kvewe = K_VEWE AND
KOTABNR = TABNO.
IF SY-SUBRC NE 0.
WRITE: / 'No entry in T681 for number ', TABNO.
WRITE: / 'Check whether corresponding condition table exists.'.
EXIT.
ENDIF.
TABLE = T681_STR-KOTAB.
SELECT KNUMH FROM (TABLE) INTO KNUM.
SELECT SINGLE * FROM KONH WHERE KNUMH = KNUM.
IF SY-SUBRC NE 0.
INT_KNUMH-KNUMH = KNUM.
COLLECT INT_KNUMH.
ENDIF.
ENDSELECT.
DESCRIBE TABLE INT_KNUMH LINES LV_NUM.
IF LV_NUM EQ 0.
WRITE: / 'No inconsistent entries found.'.
WRITE: / 'Each record in the condition table has a corresponding.'.
WRITE: / 'entry in the KONH table.'.
EXIT.
ENDIF.
LOOP AT INT_KNUMH.
IF TESTMODE IS INITIAL.
DELETE FROM (TABLE) WHERE
KNUMH = INT_KNUMH-KNUMH.
IF SY-SUBRC = 0.
WRITE: / 'KNUMH =', INT_KNUMH-KNUMH(10), ' deleted from table ' ,TABLE.
ELSE.
WRITE: / 'DELETE: SY-SUBRC is', SY-SUBRC , ' FOR KNUMH = ' .
WRITE: INT_KNUMH-KNUMH(10).
ENDIF.
ELSE.
WRITE: / 'TESTRUN: KNUMH =', INT_KNUMH-KNUMH(10).
ENDIF.
ENDLOOP.
is their any Standerd Function module for comparing tables if the condition record not exist in it has to exit if it is their then compare those two tables if not exist in one table also that has to be delete the condition record
Please let me know .....Hi,
You can use Function module PRICING_CHECK to check condition record. Do a where-used list on it to see how to call it.
Regards
Kiran Sure -
Hi is there any function module for radix conversion
Hi,
I need to convert number of base 36 to decimal number. Is there any function module for that.
i.e) z to 35
10 to 36
11 t0 37Hai,
This program perfectly converts a number from one number system to another number system.
REPORT Z_RADIX_CONVERSION.
PARAMETERS:
P_S_RAD(2) TYPE N, " Source Radix
P_D_RAD(2) TYPE N, " Destination Radix
P_S_NUM(5) TYPE C. " Source Number
*" Data declarations...................................................
Work variables *
DATA:
W_LEN TYPE I,
W_FACT TYPE I,
W_D_NUM(5) TYPE N,
W_T_LEN TYPE I,
W_NUM TYPE C,
W_NUM1 TYPE I,
W_REM TYPE I,
W_INDEX TYPE I VALUE 20,
W_T_NUM(30) TYPE C,
W_T_NUMBER(5) TYPE N.
IF P_S_RAD GE 1 AND
P_S_RAD LE 16 AND
P_D_RAD GE 1 AND
P_D_RAD LE 16.
IF P_S_RAD EQ 01 AND P_S_NUM CO '0 ' OR
P_S_RAD EQ 02 AND P_S_NUM CO '01 ' OR
P_S_RAD EQ 03 AND P_S_NUM CO '012 ' OR
P_S_RAD EQ 04 AND P_S_NUM CO '0123 ' OR
P_S_RAD EQ 05 AND P_S_NUM CO '01234 ' OR
P_S_RAD EQ 06 AND P_S_NUM CO '012345 ' OR
P_S_RAD EQ 07 AND P_S_NUM CO '0123456 ' OR
P_S_RAD EQ 08 AND P_S_NUM CO '01234567 ' OR
P_S_RAD EQ 09 AND P_S_NUM CO '012345678 ' OR
P_S_RAD EQ 10 AND P_S_NUM CO '0123456789 ' OR
P_S_RAD EQ 11 AND P_S_NUM CO '0123456789A ' OR
P_S_RAD EQ 12 AND P_S_NUM CO '0123456789AB ' OR
P_S_RAD EQ 13 AND P_S_NUM CO '0123456789ABC ' OR
P_S_RAD EQ 14 AND P_S_NUM CO '0123456789ABCD ' OR
P_S_RAD EQ 15 AND P_S_NUM CO '0123456789ABCDE ' OR
P_S_RAD EQ 16 AND P_S_NUM CO '00123456789ABCDEF ' .
W_LEN = STRLEN( P_S_NUM ).
W_T_LEN = W_LEN - 1.
DO W_LEN TIMES.
W_NUM = P_S_NUM+W_T_LEN(1).
CASE W_NUM.
WHEN 'A'.
W_NUM1 = 10.
WHEN 'B'.
W_NUM1 = 11.
WHEN 'C'.
W_NUM1 = 12.
WHEN 'D'.
W_NUM1 = 13.
WHEN 'E'.
W_NUM1 = 14.
WHEN 'F'.
W_NUM1 = 15.
WHEN OTHERS.
W_NUM1 = W_NUM.
ENDCASE.
W_D_NUM = W_D_NUM + W_NUM1 * ( P_S_RAD ** W_FACT ).
ADD 1 TO W_FACT.
SUBTRACT 1 FROM W_T_LEN.
ENDDO.
ELSE.
WRITE'Invalid Number'(003).
ENDIF.
ELSE.
WRITE'Enter radix between 1 and 16 '(002).
ENDIF.
W_T_NUMBER = W_D_NUM.
IF P_D_RAD = 1.
DO W_D_NUM TIMES.
WRITE'O'.
ENDDO.
ELSE.
WHILE W_T_NUMBER NE 0.
W_REM = W_T_NUMBER MOD P_D_RAD.
CASE W_REM.
WHEN 10.
W_T_NUM+W_INDEX(1) = 'A'.
WHEN 11.
W_T_NUM+W_INDEX(1) = 'B'.
WHEN 12.
W_T_NUM+W_INDEX(1) = 'C'.
WHEN 13.
W_T_NUM+W_INDEX(1) = 'D'.
WHEN 14.
W_T_NUM+W_INDEX(1) = 'E'.
WHEN 15.
W_T_NUM+W_INDEX(1) = 'F'.
WHEN OTHERS.
W_T_NUM+W_INDEX(1) = W_REM.
ENDCASE. " CASE W_REM.
SUBTRACT 1 FROM W_INDEX.
W_T_NUMBER = W_T_NUMBER DIV P_D_RAD.
ENDWHILE.
ENDIF.
WRITE:
/10 'The Equivallent number in Base'(001),
P_D_RAD,
'is',
W_T_NUM.
<b>Reward points if helpful .</b>
regards,
rama pammi -
Any Function module for Date conversion
Hi,
In my output the date is coming like 80999898 but the actual date is 01.01.1900.
Could you please tell me is there any Function module for that.
Regards,
TusharUse the conv. exit CONVERSION_EXIT_INVDT_OUTPUT for this purpose.
BR,
Suhas -
Any function module for getting fiscal year week numbers
can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
Thanks!
Lakshmikandhhi,
Use FM <b>'DATE_GET_WEEK'</b>...
parameter D1 LIKE SCAL-DATE.
Data w like scal-week.
CALL FUNCTION <b>'DATE_GET_WEEK'</b>
EXPORTING
date = D1
IMPORTING
WEEK = W
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write W+4(2).
Regards,
Santosh -
Any Function Module For getting Shipment Details
Hi All,
I want to get all details of shipment. i tired , but unable to get any function? I was able to find the creation or change shipment function modules, but not able to find the function module for getting the details for Shipment.
like BAPI_SHIPMENT_CHANGE Change Shipment
BAPI_SHIPMENT_CREATE Create Shipment
similary
Do you have any idea for getting (display)the details of Shipments?
Regards,
Rajuhi,
you can use
VTTP,VTTK
or
RV_SHIPMENT_READ -
Any function module for PIC01??
Hi Guys,
Could you please tell me, do we have any function module / BAPI for the transaction PIC01 - to create supersession....
suggest me if any one worked on supersession conversion....
-Mahesh.Hi Ragesh,
try with requirements (in the VOFM area).
Cheers,
Stefan. -
Is there any function module for converting text to hyperlink?
Hello all,
I am designing an application in BSP wherein the user can enter hypertext values for some
of the data enteries in the database table. Is there any function module available for converting
text into hypertext. Eg. if the user enters 'www.mypersonalwp.com' then it should convert this
text value into a hyperlink.
Thanks in advance.
Gurmahima.Hi,
Refer the given below link
http://help.sap.com/saphelp_erp2004/helpdata/EN/85/ce25c2d7ae11d3b56d006094192fe3/content.htm
Hope it helps you
Thanks
Arun Kayal -
Any function module for calling a text editor in subscreen?
Hi,
I would like to know if there is any function module that can be used to call a text/note editor and can be displayed in a subscreen of a main screen (dialog programming)? This text/note editor should not be able to edit, but for display only.
Please help. Thanks...>
Pablo Casamayor wrote:
> Hi,
>
> maybe this can help:
>
> check program SAPTEXTEDIT_TEST_1
> in this program pay attention to:
>
>
> MODULE pai INPUT.
>
> CASE ok_code.
> ....
> WHEN 'FIND'.
> PERFORM find_text.
> ....
> WHEN 'HIGHLIGHT'.
> highlight = 1.
> PERFORM highlight_lines USING highlight.
>
>
>
> *&---------------------------------------------------------------------*
> *& Form FIND_TEXT
> *&---------------------------------------------------------------------*
> FORM find_text.
> found = 0.
> IF case_sensitive = 'X'. " button on Dynpro
> case_sensitive_mode = editor->true.
> ELSE.
> case_sensitive_mode = editor->false.
> ENDIF.
> IF whole_word = 'X'. " button on Dynpro
> whole_word_mode = editor->true.
> ELSE.
> whole_word_mode = editor->false.
> ENDIF.
>
> CALL METHOD editor->find_and_select_text
> EXPORTING search_string = search_string
> case_sensitive_mode = case_sensitive_mode
> whole_word_mode = whole_word_mode
> CHANGING string_found = found.
> * Flush for proper work of the following if statement
> CALL METHOD cl_gui_cfw=>flush.
> IF NOT search_string IS INITIAL.
> IF found NE 0.
> MESSAGE s000 WITH text-013.
> ELSE.
> MESSAGE s000 WITH text-014.
> ENDIF.
> ENDIF.
> ENDFORM. " FIND_TEXT
>
> *&---------------------------------------------------------------------*
> *& Form HIGHLIGHT_LINES
> *&---------------------------------------------------------------------*
> * -->P_HIGHLIGHT text *
> *----------------------------------------------------------------------*
> FORM highlight_lines USING p_highlight.
> IF selection EQ 'X'.
> CALL METHOD editor->highlight_selection
> EXPORTING highlight_mode = p_highlight
> EXCEPTIONS has_no_effect = 1.
> IF sy-subrc NE 0.
> * add your handling
> ENDIF.
> ELSE.
> CALL METHOD editor->highlight_lines
> EXPORTING
> from_line = from_line
> to_line = to_line
> highlight_mode = p_highlight
> EXCEPTIONS has_no_effect = 1.
> IF sy-subrc NE 0.
> * add your handling
> ENDIF.
> ENDIF.
>
> ENDFORM. " HIGHLIGHT_LINES
>
> and this link:
> http://help.sap.com/saphelp_45b/helpdata/EN/0e/514035634d761fe10000009b38f889/frameset.htm
>
> Best regards.
>
> Edited by: Pablo Casamayor on Apr 17, 2009 9:19 AM
Hi Pablo,
I have look through the program SAPTEXTEDIT_TEST_1. This program does the Text Selection and Highlighting the Text only after the buttons of each of the function is clicked.
My requirements will be, having all the selected text (with a string pattern) to be highlighted when this text editor is displayed. Is this possible?
Really thanks for your replies...
Regards,
Chuak Fen -
Hi, is there any function module for se16 transaction?
Hi help me out, can refer function module RS_TABLE_LIST_CREATE....found it
The below are the list of Function Modules for se16 ...
<b>
1.ATT_GET_TABLE_ENTRIES
2.R_GET_VALUES_FROM_TABLES
3.S_DATABROWSE_FIELDSELECT
4.S_INTERNAL_TABLE_VIEW
5.S_TABLE_CONTROL_GENERATE
6.S_TABLE_REPORT_GENERATE
7.S_TABLE_VIEW
8.S_TABLE_VIEW_DDIC</b>
you can use 6th or 7th function module for displaying the table data .
reward points if it is usefull ...
Girish -
Urjent-Any function module for finding Sales order, Delivery and Invoic
Hi Experts,
I am having selection screen like
Sales order
Delivery
Invoice
Customer
If i give sales order
Delivery and Invoice should pull
If i give delivery
sales order and Invoice should pull
If i give Invoice
sales order and delivery should pull
If i give customer
all customer related data should pull
Do we have any function modules to meet this reqirement?
If we have please provide function modules.
Thanks,
mahe
Edited by: Rob Burbank on Mar 30, 2009 4:17 PM
Edited by: mahahe on Mar 31, 2009 9:12 PMYou can use VBFA table, right? in the FM also, you can find the same logic, like pulling from VBFA table.
thanq -
BAPI or any Function Modules for XD02 functionality
Hello Experts,
I would like to ask if there's any BAPI or Function Module that has the functionality of transaction XD02 - whereas a sales area will be created for customers (entry in KNVV)?
My requirement is there a background job that should create a sales area for a particular customer.
Thanks in advance!Hi,
If you need to change the customer details in background use this
BAPI_CUSTOMER_CHANGEFROMDATA1
Check also :
BAPI_CUSTOMER_EDIT
or std prog RFBIDE00
Hope this helps,
Erwan
Maybe you are looking for
-
What's happening here: iCloud Photos preparing photos for 'Photos' app?
This morning I came back from a weekend trip to Prague, where I took a number of photos with my iPhone 6. On my Mac I fired up iCloud Photos to see if everything was imported properly. That was about an hour ago. Since then I am presented with this s
-
How to generate external material number?
hi all, I need to create material in the report. this material number is assigned external (manually). but the user want to generate the number. I only found the function ' MATERIAL_NUMBER_GET_NEXT' , which can only generate the internal number. Is t
-
Error in selection of clob data
Hello Everyone I am running a select on a hana table which contains clob data. But i receive some notification regrading persistence Could not complete result operation. SAP DBTech JDBC: [21]: persistence error: exception 70029020: ltt::exception cau
-
I upgraded from 4s to 5s. For backup and restore I used itunes on a new mac that I had never synced my 4s to before. There are songs on my 4s that will not transfer to the mac and therefore not to my 5s. Some of these are songs that had ripped from
-
Editable CL_GUI_ALV_TREE?
Hi, Is it possible to edit cells in CL_GUI_ALV_TREE? If yes, can you explain how? Regards.