Very urjent how to validate filed in dialogprograming
hi experts this is very urjent reqirement.
i am doing dialog prg i have four fields in my screen like kunnr name1 etc.. this fields coming from (kna1) internal table is it_mat.
i have another table like knvv.
validation is.
when i click on save the reord shoud be update based on knvv-kunnr1.
for ex in knvv-kunnr1 having record 1234. if i go for my dialog prg kna1-kunnr inserting the same record 1234 wiill be accept and update table kna1 other vice eroor will be display like record does not exist in knvv-kunnr.
can u please provide logic
thanks in addvance
points will be awarded
Hi Maha,
In the PAI of the concerned screen, create a module. In the module, check the kunnr from the screen field against the knw table using SELECT. If a record is found in the table, go ahead and save the entry in KNA1 else show the error message.
Hope this helps.
Sanjeev
Similar Messages
-
Very urjent how to send report output in mail
hi experts,
how to send report output in mail which function module should i use wht parameters should i pass.
thanks in addavnce,
points to be awarded.CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = '026c'
copies = count
list_name = 'VATS_ASBUILT'
list_text = v_list
immediately = 'X'
release = 'X'
new_list_id = 'X'
expiration = days
line_size = 132
line_count = 65
layout = 'X_65_132'
* sap_cover_page = 'X'
* cover_page = 'X'
receiver = 'SAP*'
department = 'VATS'
no_dialog = 'X'
IMPORTING
out_parameters = params
valid = valid.
SUBMIT zppr_vats_asbuilt WITH p_aufnr EQ v_aufnr
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS params
AND RETURN.
SELECT SINGLE rqident FROM tsp01 INTO l_spoolno
WHERE rqtitle = v_list .
* convert report to PDF format
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = l_spoolno
no_dialog = 'X'
TABLES
pdf = l_ipdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT .
ENDIF.
Now comes the part to send the mail
try.
* -------- create persistent send request ------------------------
send_request = cl_bcs=>create_persistent( ).
clear document.
* -------- create and set document with attachment ---------------
* create document from internal table with text
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = text
i_length = '12'
i_subject = '' ).
*changing the content of the attachment
binary_content[] = l_iobjbin[].
*change the name of the PDF attachment
concatenate 'Build ID' s_buildid_i 'Rev' v_buildid_rev
into i_att_sub separated by space.
* add attachment to document
call method document->add_attachment
exporting
i_attachment_type = 'PDF'
i_attachment_subject = i_att_sub
i_att_content_hex = binary_content.
*setting the option to send an e-mail more than 50 characters
call method send_request->set_message_subject
exporting
ip_subject = t_sub.
* add document to send request
call method send_request->set_document
exporting
i_document = document.
* --------- set sender -------------------------------------------
* note: this is necessary only if you want to set the sender
* different from actual user (SY-UNAME). Otherwise sender is
* set automatically with actual user.
sender = cl_sapuser_bcs=>create( 'VATSUPPORT' ).
call method send_request->set_sender
exporting
i_sender = sender.
*Send the list based on receivers list obtained
loop at l_ireclist.
AD_SMTPADR = l_ireclist-receiver.
* --------- add recipient (e-mail address) -----------------------
* create recipient - please replace e-mail address !!!
recipient = cl_cam_address_bcs=>create_internet_address(
AD_SMTPADR ).
* add recipient with its respective attributes to send request
call method send_request->add_recipient
exporting
i_recipient = recipient
i_express = 'X'.
ENDLOOP.
call method send_request->set_status_attributes
exporting
i_requested_status = 'E'
i_status_mail = 'E'.
* To send the mail immediately
call method send_request->set_send_immediately( 'X' ).
* ---------- send document ---------------------------------------
call method send_request->send( ).
commit work. -
Very Urjent: How to delete temporary files on the server.
EBS:
We are facing a big issue with huge volume of temporary directory.We have created invoice program which uses Bursting concept. Every concurrent program is erroring out. How to delete those files automarically.
Where these temp files are getting stored. How can we delete them once the concurrent request is completed.
Please help me..its a huge issue. Thanks in advance.Sorry Steven,
I saw your solution. Thanks for that. But I just want to know, do we have any setups in XML Publisher Administrator or bursting control file to delete the files automatically once the concurrent request is completed.
And one more thing I found is, In the xml administrator, General properties i have specified the temporary directory as '/tmp'. But all the temporary files are loading in '$XDO_TOP/temp' directory. Why is this.. -
How to validate a filed in a search help which is created in se11
hi
i got a requirement that validate a search help. i created a ztable with 3 fileds for that one i have to create a search help so help me to how to validate fields in a search help.
regards
krishnaHello Krishna,
What do you mean by validating a field? Usually you use a search help to display possible values for a certain input field based on values in another table. You can restrict the values that are displayed by certain conditions if you need to.
If you want to allow only values based on complex conditions or authorizations of the user, you can always create a search help exit and in there you have complete control over what the user is allowed to see in the search help and what he is allowed to select.
Function Module F4IF_SHLP_EXIT_EXAMPLE gives you an idea what you can do in a search help exit.
Regards,
Michael -
How to validate Quantity field in TV - Inputfield ?
Hello All,
I'm using a table view to show the output .
IN this table view I made 2 fields as Input fields.
Both the fields are Quantity fields.
Now when the user enters a value in this Quantity field I want to validate it with respect to it's units .
How can I do that ?
In my case if the user enters correct value it works but when he enters a wrong value my BSP is going for a dump.
I tried to debug the<b> LIPS table</b> to verify how SAP was handling this checking for the field <b>LFIMG</b>. But there there is a statement called chain --endchain.
SO there is no chance for debugging.
My code is as follows :-
LOOP AT gt_final INTO wa_final.
CLEAR: gv_row,lv_qty,lv_string,gv_len,gv_cell_id1.
gv_row = sy-tabix.
gv_len = STRLEN( gv_row ).
gv_len = gv_len - 1.
* Modify the Third Column
CONCATENATE 'INB01_TV_ID' '_' gv_row(gv_len) '_' '3' INTO gv_cell_id1 .
lv_string = request->get_form_field( name = gv_cell_id1 ).
WRITE lv_string TO lv_qty UNIT wa_final-units.
CLEAR :wa_final-del_quantity.
wa_final-del_quantity = lv_qty.
MODIFY gt_final FROM wa_final TRANSPORTING del_quantity.
ENDLOOP.
Can anyone tell me how to validate the entry for the Quantity filed ?
Regards,
Deepu.K
I have one more Question .
Whenever BSP goes for a dump in this case I want to handle this by a message .
Is it possible ?
Message was edited by:
deepu kHello Raja,
I want to validate the entry in the QUantity field with respect to the Unit of the Quantity.
I.e say for example I have a unit as PC (pieces) then the quantity must be only of thousands,lakks and so..on......but not in points i.e a piece quantity must be full either 200 ,2 lakhs or 2 pieces but not 2.5 pieces.
SO now if the user enters 2.5 it's a wrong value as the quantity for the Unit PIECES can't have half-piece. (2.5 = 2 + 0.5) .SO i want to validate this .
I hope I'm clear.
How should I do ?
Regards,
Deepu.k -
How to validate the field when i am populating the data cursor to block
Hi,
I am populating data cursor to multi record block.
Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
If user enter negative values and decimal points in quantity filed i need to display message to user item level.
Please do the needful how to do it.902434 wrote:
Hi,
I am populating data cursor to multi record block.
Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
If user enter negative values and decimal points in quantity filed i need to display message to user item level.
Please do the needful how to do it.If you want to validate at entry level then use When-Validate-Item trigger and check the input and show message. Like
If :quentity <0 then
message('do not enter negative value');
message('do not enter negative value');
raise form_trigger_failure;
end if;Why u open same thread again ? not closing one.. check this one
</a>
How to validate the field when i am populating the data cursor to block
Hopes this helps
If someone's response is helpful or correct, please mark it accordingly. -
How to validate the input field
Hi,
I have a input form which is draged from input port of a RFC.
in this input form i have two input fields nad submit button.
on of this input field should always take the character values only. it should not take any numeric value
and other input field should always take numeric value only.
i.e how to validate this two input fields.
regards
srinivasHi,
U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows
http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm
There are two ways to achieve ur task.
1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following
http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA
http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this
http://aspzone.com/blogs/john/articles/173.aspx
Everything has been given for validating in javascript.i hope u also validating in javascript only.
For more details on "Regular expressions" search google.
Regards,
Tamil K -
How to validate user inputs against checktables
Hi all,
how to validate userinputs for s_bukrs and s_hkont against respective check tables(t001 and skb1).
can u pl zprovide me codeing for this validations.
very urgent.
thanks in advance
swathiHi
Write the report
REPORT ZREPORT.
tables: t001,skb1,
select-options: s_bukrs for t001-bukrs,
s_hkont for skb1-saknr.
AT SELECTION-SCREEN.
Validate the screen fields
PERFORM validate_screen.
*& Form validate_screen
Validation of Selection Screen fields
FORM validate_screen .
Validation of Company code
CLEAR t001-bukrs.
IF NOT s_bukrs[] IS INITIAL.
SELECT bukrs UP TO 1 ROWS
INTO t001-bukrs
FROM t001
WHERE bukrs IN s_bukrs.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Company code'(002).
ENDIF.
ENDIF.
Validation of Account Number
CLEAR skb1-SAKNR.
IF NOT s_SAKNR[] IS INITIAL.
SELECT SAKNR UP TO 1 ROWS
INTO skb1-SAKNR
FROM skb1
WHERE SAKNR IN s_SAKNR and
bukrs in S_BUKRS.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Invalid Account Number'(003).
ENDIF.
ENDIF.
ENDFORM.
Reward points if useful
Anji -
How to validate an XML with its XSD in jdk1.4.2_09?
Hi all,
Kindly Tell me how to validate an Xml against an XSD in JDK1.4.2_09....
I was able to do it in jdk1.5 using the Validation class available in java.xml.validation package...
But the Task for me is to do in jdk1.4.2 since my application server runs on jdk1.4.2... changin to jdk1.5 will result in failure of main application...
sample code will be useful...
thanks in advance.
Regards,
Sundararamaprasad.HI,
Thanks for the suggestion.... The Thing is when i compiled and executre my code it really got execute well when i ran it in the Command Prompt after settiongup appropriate classpath and path... but when i executed the same thing in the server it did not get executed though the application server also run on top of the same JDk.....I've check it out..anyhow the link gave me a very good learning...Thanks for the valuable suggestion..... :)
Regards,
Sundararamaprasad. -
How to validate the phone using Javascript with regularexpression
Hi ,
I wanted to validate the phone no with java script regular expression in Sun IDM Xpress code.
I have written the code like
<script>
var bolean = testStr.match(\d{3}-\d{3}-\d{4});
</script>
But it not validating and giving the "undefined: illegal character (; line 1)"
Can any body help me how to validate phone no in the java script regular expression in Sun IDM.
Thanks in advance.
Regards,
Ranjancreate a javascript rule that include the regular expression validation and call that rule from the filed validation section passing the field value.
S. -
How to validate numbers in char field.
Hello all,
I have one database column with char data type. This field should allow insert only
numbers [ zero to nine] and plus symbol .. how to validate this?
Pls help me..
I.m using oracle 9i database. So it does not allow REG-EXP and WITH methods.. So give some
sql coding to do thisAs this forum is for issues with the SQL Developer tool, you'll probably get more answers in the SQL And PL/SQL forum.
Regards,
K. -
How to validate the dates in the table control ?
How to validate the dates in the table control ?
Can I write like this ?
LOOP AT it_tab .
CHAIN.
FIELD : it_tab-strtdat,it_tab-enddat.
module date_validation.
ENDCHAIN.
ENDLOOP.
Module Date_validation.
ranges : vdat type sy-datum.
vdat-sign = 'I'.
VDAT-LOW = it_tab-STRTDAT.
VDAT-HIGH = it_tab-ENDDAT.
VDAT-OPTION = 'BT'.
APPEND VDAT.
WHAT CODE I have to write here to validate ?
and If I write like this How can we know which is the current row being add ?
It loops total internal table ..?
Bye,
Muttu.Hi,
I think there is no need to put chain endchain.
To do validation you have to write module in PAI which does required validations.
Thanks
DARSHAN PATEL -
How to validate material status in physical Inv Doc creation using MI01
Hi Experts,
I would like to know how to validate material status while creating physical inventory document using MI01 transaction.
I tried to figure out a suitable BADI and customer exits ,but it didnt work out well.
Kindly share your thoughts on how this can be achieved.
Regards,
Mohammed Aslam RasheedDo you really create your inventory documents with this MI01 transaction manually by entering material for material?
The real transaction for physical inventory is MI31. How do you want SAP to react if hundreds of materials are selected and inventory documents are created in a batch process?
SAP takes care about the material status in MI04 and MI07 transactions.
I am not aware of any exit for MI01 maintenance, you may consider Explicit and Implicit Enhancement Options -
How to Validate a User on the click of a button in Oracle APEX
Hi,
How to Validate a User on the click of a button in Oracle APEX.
say for e.g: I want to allow only a specific user to go beyond after clicking on a button and restrict all the other Users. Any ideas please.
Thanks in Advance,
AfWell , the actual idea was to hide the button for specific users and show the button only for some specific users... is this possible...?
@ AndyH: yeah, what you have suggested also fits well for my requirement... Could you please let me know how can i achieve it...
Regards,
Af -
How to validate the file path when downloading.
Hi
How to validate the file path when downloading to Presentation or application Server.hiii
you can validate file path by following way
REPORT zvalidate.
TYPE-POOLS: abap.
DATA: w_direc TYPE string.
DATA: w_bool TYPE abap_bool.
w_dir = 'c:\Myfolder\'.
CALL METHOD cl_gui_frontend_services=>directory_exist
EXPORTING
directory = w_direc
RECEIVING
result = w_bool
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
OTHERS = 5.
IF NOT w_bool IS INITIAL.
WRITE:/ 'Directory exists.'.
ELSE.
WRITE:/ 'Directory does not exist.'.
ENDIF.
regards
twinkal
Maybe you are looking for
-
While installing the Designer repository I received the below errors... Any suggestions Message ORA-04068: existing state of packages has been discarded Cause One of errors 4060 - 4067 when attempt to execute a stored procedure. Action Try again afte
-
Registering standalone RMI server in WebLogic JNDI
Hi, I need to register a standalone RMI server in WebLogic JNDI. I'm sure I've done this before, but now I'm having problems! I have a standalone program which creates a remote object (implements Remote and extends UnicastRemoteObject). I am compilin
-
How to pull call reports from Customer Service phones
I have a building that has normal users and a group of customer service users and I would like to pull a report showing how many incoming and or outcgoing calls just from customer service.How would you recomend doing this?
-
Hi, Oracle Version:10.2.0.1.0 Operating System:Windows Xp How to start the multiple listeners in the database. Here is my Listner.ora file # listener.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\network\admin\listener.ora # Generated
-
Importing Windows Creative Memories Files into iPhoto
I just got my wife a Macbook for Christmas and have successfully imported almost everything from her old PC. The one problem I have is that she invested a considerable amount of time labeling and organizing digital pictures on the PC using a Creative