How to attach a text table to database table
How to attach a text table to another database table,
Ex: If we check Mara table and GoTO menu select text table it is displaying MAKT table, how to link that?
create another table with foriegn key relation with the key field and in the check table give the primary key table and in the text table include sparas field.
JUAT SAME AS CREATING ANOTHER TABLE WITH FORIEGN KEY RELATION but THE ANOTHER TABLE INCLUDES SPRAS (LANGUAGE KEY)
A text table is a table that contains spoken-language descriptions of values in a check table. These descriptions are stored in multiple languages. The primary key of the text table is the same as the primary key of the check table, with the addition of a spras (language) column.
For example, the ztxt005 table has country codes in it. Country names are stored in a separate table named ztxt005t (shown in Figure 4.7) because you actually need many names for one country code. Because it stores language-specific descriptions of a generalized code, ztxt005t is called a text table.
The primary key of ztxt005t contains the same fields as the primary key of ztxt005, with the addition of a spras (language) column. The spras field contains the language code and enables this table to contain a description for multiple logon languages.
The primary key of any text table is composed of the fields mandt and spras, followed by the validation field (or fields). One or more description fields follow this primary key.
A foreign key relationship is defined on ztxt005t-land1 to check table ztxt005. The foreign key field type should be key fields of a text table.
Similar Messages
-
How to attach a text in the center of the Ellipse using JXML ?
How to attach a text in the center of the Ellipse using JXML ? Can we use labelFor="$topEllipse" ?
<StackPane fx:controller="myfxml.ArchiveLogsController" id="Login" xmlns:fx="http://javafx.com/fxml">
<children>
<AnchorPane>
<!-- Prevent AnchorPane so that it's max = pref. This causes it to center in StackPane -->
<maxWidth><Double fx:value="-Infinity"/></maxWidth>
<maxHeight><Double fx:value="-Infinity"/></maxHeight>
<children>
<Ellipse fx:id="topEllipse" centerX="100" centerY="100" radiusX="50" radiusY="10" strokeWidth="2" stroke="#FF0000" style="-fx-fill: linear-gradient(to right, white 0%, red 100%);"/>
*<Label fx:id="ArchLogs_lb" text="My Ellipse Label" />*
</children>
<properties>
<backgroundColor>
<Color blue="1.0" green="1.0" red="1.0" />
</backgroundColor>
<elementLockSel>
<Boolean fx:value="true" />
</elementLockSel>
</properties>
</AnchorPane>
</children>
</StackPane>I'd suggest putting the Ellipse and the Label in a StackPane.
I wonder why so many people call it JXML?
It is so strange - I guess the JXML name just seems more natural to some people, though I don't know why.
I think Greg is right and that labelFor is not what you want:
http://docs.oracle.com/javafx/2.0/api/javafx/scene/control/Label.html
"Labels also are useful in that they can have mnemonics which, if used, will send focus to the Control listed as the target of the labelFor property . . . A Label can act as a label for a different Control or Node. This is used for Mnemonics and Accelerator parsing. This allows setting of the target Node." -
How to attach a text file as an attachment to email message?
Hello Everybody,
I have a .csv file, in which details about emp-id, emp-name, e-expenses for Reimbursement and email address are stored.
My application reads this .csv file, and sends a mail to each employee with his id, salary details in text format. (by changing content type to "text/plain") The code is working fine. But,
My problem is:
The message is sent as message body to the end user.
The end user / the person who receives this mail will not be a technical person. So,
1) If he trys to take a print out of this e-mail, He get only half of it.(as no. of colums will be more than paper size).
2) I am finding alignment problem. IF employee name is too big, other columns will shift to right and data will not be exactly under column header. (it is going in zig zag way)
So, I thought sending text file with all the details as an attachment might do well.
But, I don't know how to attach a text file to email-message body.
code
try
{ String s1="";
File f1 = new File(the path);
FileInputStream fstream = new FileInputStream(f1); //new
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
int count=0;
while((s1=br.readLine())!=null )
count++;
//out.println("within while loop "+count);
StringTokenizer st = new StringTokenizer(s1,",");
if ((st.hasMoreTokens())&&(count>1))
String a=st.nextToken().trim();
String b=st.nextToken();
String c=st.nextToken();
String d=st.nextToken();
String e=st.nextToken();
String f=st.nextToken();
String g=st.nextToken();
String h=st.nextToken();
String i=st.nextToken();
String j=st.nextToken();
String k=st.nextToken();
String l=st.nextToken();
String m=st.nextToken();
String n=st.nextToken();
String o=st.nextToken();
String p=st.nextToken();
String q=st.nextToken();
String mail=st.nextToken();
String s=st.nextToken();
//out.println("b="+b+"c="+c+"d="+d+"e="+e+"f="+f+"mail="+mail);
%>
<%
String to =mail;
String from =request.getParameter("fromadd");
String subject ="Statement of Expenses";
String smtp ="mail.xxxxxxxxxx.com";
String message="";
message=message.concat("EMP ID");
message=message.concat(" ");
message=message.concat("Name");
message=message.concat(" ");
message=message.concat("Dept No.");
message=message.concat(" ");
message=message.concat("Acc No.");
message=message.concat(" ");
message=message.concat("*****************************************************************************************");
message=message.concat(a);
message=message.concat(" ");
message=message.concat(b);
message=message.concat(" ");
message=message.concat(c);
message=message.concat(" ");
message=message.concat(d);
Properties props = System.getProperties();
// Puts the SMTP server name to properties object
props.put("mail.smtp.host", smtp);
// Get the default Session using Properties Object
Session session1 = Session.getDefaultInstance(props, null);
// Create a New message
MimeMessage msg = new MimeMessage(session1);
// Set the From address
msg.setFrom(new InternetAddress(from));
// Setting the "To recipients" addresses
msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
/* // Setting the "cc recipients" addresses
msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc, false));
// Setting the "Bcc recipients" addresses
msg.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc, false)); */
// Sets the Subject
msg.setSubject(subject);
// set the meaasge in HTML format
msg.setContent(message,"text/plain");
// Set the Date: header
msg.setSentDate(new java.util.Date());
// Send the message
Transport.send(msg);
// Display Success message
result =result.concat("<tr><td>"+b+"</td>"+"<td>"+to+"</td></tr>");
}//end of if of hasmore element
}// end of while loop
out.println(result);
}catch(Exception e)
// If here, then error in sending Mail. Display Error message.
result="Unable to send your message";
out.println("e="+e);
Any help will be appreciated.
Thanks and regards.
Ashvini<html>
<p>
MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setText("Your Messages");
MimeBodyPart mbp2 = new MimeBodyPart();
FileDataSource fds = new FileDataSource("Your Attachments");
mbp2.setDataHandler(new DataHandler(fds));
mbp2.setFileName(fds.getName());
Multipart mp = new MimeMultipart();
mp.addBodyPart(mbp1);
mp.addBodyPart(mbp2);
msg.setContent(mp);
msg.saveChanges();
msg.writeTo(System.out);
msg.setSubject(subject);
Transport.send(msg);
</p>
<B><U>See you can add above code in your program and see the magic</U></B>
Bye
regards--
Ashish
</html> -
How to read the TEXT TABLE (or) .CSV in HSQLDB Standalone using Java
Hi, I like to use the text tables in our application. And like to use the HSQL Database Engine as Standalone. I created the text tables, those are stored in the disk as ".CSV" files. But i am unable to read that text table (.CSV) when i relogin and gave the CSV file path as URL along with "jdbc:hsqldb:file". So can anybody give me the tips how use the text tables.
Regards,
VinayYou need to make a URLConnection to the page you want, and get the input stream from that page.
The contents of the input stream (use a reader to get them) will give you the raw HTML code. Use a parser to get the actual content. I dont know of a parser offhand, but you can search for one. -
How to read the TEXT TABLES (Or) .CSV in HSQLDB using JAVA
Hi,
I want to use the HSQLDB instead of mdb in our application. I am using the HSQLDB Engine Standalone mode, and given a file name "TEMP" in URL along with the "jdbc:hsqldb:file:". Then a I created a TEXT TABLE, that table was created as a .CSV file in the Disk. But I am unable to read that CSV, I tried that file in the database URL. But its not working. Can anubody give me the suggestions.
Thankyou,
Regards,
Vinay.Hi Rajeshreddy.k,
To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
$Users = Get-Content -Path 'C:\ListOfUsernames.txt'
$Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
Add-ADGroupMember -Identity $Group -Members $Users -
How to attach value range table to dropdown list box
Hi there,
could u please explain me how to attach a value range table to dropdown list box (i.e I/O box with dropdown attribute as list with key).
if possible please explain me with a sample code.
Thanks in advance.
-Tulasi.hi ...if the associated domain of the field that u are using as i.o field has value range the same will come as drop down list...u u select the list box option and click from dictionary check box on the attributes...
To check if the domain has it or not...go to the domain..click on value range..u can see thr,...if values are not thr u can giv the same...
Or if u are not refering to dictionary type then use fm VRM_SET_VALUes
reward if the abv is helpful.. -
How to attach a text/htm document to the message
Trying to attach a text/htm document to a workflow message and it is not working. Can someone please help?
Tried to attach it as a PL/SQL CLOB but the notification is never sent. It errors out with
ERROR:[SVC-GSM-WFMLRSVC-224510-10006 : oracle.apps.fnd.wf.mailer.SMTPOutboundProcessor.send(Message)]:Problem encountered when sending to {[["[email protected]"]]} -> javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.IOException: No content
Wrote a stand-alone procedure to check if it can load the file to a clob and displayed the contents and it read and displayed correctly so I am not sure why it does not generate any content.
DBMS_LOB.CREATETEMPORARY(
lob_loc => temp_clob
, cache => false
, dur => dbms_lob.call
DBMS_LOB.OPEN(
lob_loc => temp_clob
, open_mode => DBMS_LOB.LOB_READWRITE
DBMS_LOB.OPEN(src_clob, DBMS_LOB.LOB_READONLY);
DBMS_LOB.LoadCLOBFromFile(
DEST_LOB => temp_clob
, SRC_BFILE => src_clob
, AMOUNT => DBMS_LOB.GETLENGTH(src_clob)
, DEST_OFFSET => dst_offset
, SRC_OFFSET => src_offset
, BFILE_CSID => DBMS_LOB.DEFAULT_CSID
, LANG_CONTEXT => lang_ctx
, WARNING => warning
DBMS_LOB.CLOSE(src_clob);
amount := dbms_lob.getLength(temp_clob);
dbms_lob.copy(document,temp_clob,amount,1,1);
document_type := 'text/htm' || ';name=' || filename;
DBMS_LOB.CLOSE(lob_loc => temp_clob);
DBMS_LOB.FREETEMPORARY(lob_loc => temp_clob);
Then I tried to attach it as a PL/SQL BLOB and now it errors out with a different error.
[WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: [WFMLR_DOCUMENT_ERROR]' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK= WF_MAIL.GetDocLOBContent(ORDER_RPT) WF_XML.GetAttachment(1079953, text/html) WF_XML.GetAttachments(1079953 WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 1079953) WF_XML.Generate(oracle.apps.wf.notification.send, 1079953) WF_XML.Generate(oracle.apps.wf.notification.send, 1079953) Wf_Event.setMessage(oracle.apps.wf.notification.send, 1079953, WF_XML.Generate) Wf_Event.dispatch_internal()
DBMS_LOB.CREATETEMPORARY(
lob_loc => temp_lob
, cache => false
, dur => dbms_lob.call
DBMS_LOB.OPEN(
lob_loc => temp_lob
, open_mode => DBMS_LOB.LOB_READWRITE
DBMS_LOB.FILEOPEN(src_file, DBMS_LOB.LOB_READONLY);
dbms_lob.loadblobfromfile(
DEST_LOB => temp_lob
, SRC_BFILE => src_file
, AMOUNT => dbms_lob.lobmaxsize
, SRC_OFFSET => src_offset
, DEST_OFFSET => dst_offset);
DBMS_LOB.FILECLOSE(src_file);
amount := dbms_lob.getLength(temp_lob);
dbms_lob.copy(document,temp_lob,amount,1,1);
document_type := 'text/htm' || ';name=' || filename;
DBMS_LOB.CLOSE(lob_loc => temp_lob);
DBMS_LOB.FREETEMPORARY(lob_loc => temp_lob);Figured it out. Typed in 'text/htm' instead of 'text/html' for document_type.
-
How to attach an internal table as excel file in wf container.
Hi all, I have a task that is attaching an xml file in wf container, but I need to attach as excel file, how can I convert this xml to excel ?
my currento code is like this:
* Call Transformation to generate XSTRING of the generated data *
TRY .
CALL TRANSFORMATION ztr_wf_excel
SOURCE appl_stat = li_data2
RESULT XML pi_attach.
CATCH cx_st_error INTO lo_exception.
lv_text = lo_exception->get_text( ).
ENDTRY.
IF lv_text IS INITIAL.
pi_header-file_type = 'B'.
pi_header-file_name = 'Data'.
pi_header-file_extension = 'XLS'.
pi_header-language = 'E'.
CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
EXPORTING
workitem_id = lw_worklist-wi_id
att_header = pi_header
att_bin = pi_attach
do_commit = 'X'
IMPORTING
att_id = lw_att_id.
this code is working fine, but I need to attach an excel file instead an xml file
How can I do that?
Regardshi ,
Follow this approach :
You can use following funcntions. First one to create internal table to string and second FM SCMS_STRING_TO_XSTRING to convert String to XSTRING. Then this XSTRING value you can pass to CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE.
data: tab_str type string.
data: begin of it_tab1,
name(20),
age(10) ,
end of it_tab1.
data : lv_name type xstring.
data it_tab like STANDARD TABLE OF it_tab1.
data: wa like line of it_tab.
wa-name = 'naresh'.
wa-age = '30'.
append wa to it_tab.
wa-name = 'naresh1'.
wa-age = '31'.
append wa to it_tab.
CALL FUNCTION 'SOTR_SERV_TABLE_TO_STRING'
IMPORTING
TEXT = tab_str
TABLES
TEXT_TAB = it_tab
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = tab_str
IMPORTING
BUFFER = lv_name
CALL METHOD CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE
EXPORTING
I_FILENAME = 'c:\test.txt'
I_CONTENT = lv_name
I_MIME_TYPE = 'TXT'
Refer below links. This has been discussed many times :
Re: download a file -
How to attached a sql server 2008 database on sql server 2005
Hi,
I have a backup of database designed over sql server 2008. I need to attacched this on a machine where sql server 2005 is installed and I am getting the message while attaching the database.
"The database can not be opened because it is version 661.
the server supports version 611 and earlier"You need to install/have another instance of SQL Server 2008, restore over there the database and perhaps create a SSIS package to move objects and data into SQL Server 2005
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to install Oracle text in 10g database.
Hi ,
I need to install Oracle text in a 10g database which is a pre-requisite for Application express 3.1.1.I checked for the user CTXSYS user in the database and i did not find that.
Thanks in advanceIf you dont see CTXSYS user, you have to use the OUI to install the Oracle text. You have to connect as sys to do it. See the metalink post below,
https://metalink.oracle.com/metalink/plsql/f?p=130:14:1539928194117127807::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,275689.1,1,1,1,helvetica -
How to generate an email on a database event?
Dear gurus...I've heard about diferent ways of generating email in response to a database event e.g
1 - Using UTL_MAIL package
or
2 - Event Driven Reporting feature of 10g Database and using SRW.Run_Report package to generate and mail a report.
Now I'm confused that how should I accomplish the following tasks:
(i) - How to generate an email after Insert/Update/Delete on a table and acknowledge the concerned users about that event?
(ii) - How to attach a text file with that email?Dear Ivan...I've tried both UTL_SMTP and UTL_MAIL, UTL_SMTP is working well and sending mails but following code of UTL_MAIL is giving the error which I can't guess, why?
DECLARE
CRLF CHAR(2) := CHR(10) || CHR(13);
BEGIN
UTL_MAIL.SEND(sender => '[email protected]',
recipients => '[email protected]',
cc => NULL,
bcc => NULL,
subject => 'Test Email',
message => 'Test line1' || CRLF || CRLF || 'Test line2',
mime_type => 'text/plain; charset=us-ascii',
priority => 1);
END;
and the error is:
ORA-29279: SMTP permanent error: 554 Message is not RFC compliant
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 345
ORA-06512: at "SYS.UTL_MAIL", line 577
ORA-06512: at "SYS.UTL_MAIL", line 594
ORA-06512: at line 4
could u guess why this error is generating???
P.S...I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production on MS-Windows Server-2003. -
How to attach a text/xml filel in soap response. can any body explain in detail about this.
Probably MTOM is what you need:
http://edocs.bea.com/wls/docs100/webserv/jws.html#mtom
But this is apparently not doable with ALSB (it would be supported just with regular web services):
http://forums.bea.com/thread.jspa?threadID=300002302
Note the file naming would need to be done by the SOAP client:
http://www.jroller.com/gmazza/date/20071102 (Look at Steps #6 and #11 and Note # 7)
HTH,
Glen -
Attach disclaimer text sent out from the Outbound emails in PeopleSoft
Hi,
Any idea on How to attach disclaimer text for all the Outbound emails in PeopleSoft .
Thanks
Soundappan
Edited by: Soundappan on May 24, 2011 10:23 PM
Edited by: Soundappan on May 24, 2011 10:24 PMThe simplest way is to contact your email server team. I know exchange can add a disclaimer to all outgoing messages.
-
How to extract data from text file to database table
Hi ,
I am trying to upload data in text file to database table using GUI_UPLOAD function .what would be the program for that.
thanks in advance.Hi,
I don't think you have a standard sap program to upload data from file to database table...
Instead you can create a custom program like this..
DATA: T_FILEDATA(1000) OCCURS 0 WITH HEADER LINE.
DATA: T_ZTABLE LIKE ZTABLE OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\TEST.TXT'
tables
data_tab = T_FILEDATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT T_FILEDATA.
T_ZTABLE = T_FILEDATA.
APPEND T_ZTABLE.
ENDLOOP.
MODIFY ZTABLE FROM TABLE T_ZTABLE.
COMMIT WORK..
Thanks,
Naren -
How to update field values in a database table using module pool prg?
hi
how to update field values in a database table using module pool prg?
we created a customized table, and we put 2 push buttons in screen painter update and display.
but update is not working?
data is enter into screen fields and to internal table, but it is not updated in database table.
thanks in adv
vidyaHI,
we already used the update statement. but its not working.
plz check this.
*& Module Pool ZCUST_CALL_REC
PROGRAM ZCUST_CALL_REC.
TABLES: ZCUST_CALL_REC,ZREMARKS.
data: v_kun_low like ZCUST_CALL_REC-kunnr ,
v_kun_high like ZCUST_CALL_REC-kunnr,
v_bud_low like ZCUST_CALL_REC-budat,
v_bud_high like ZCUST_CALL_REC-budat.
ranges r_kunnr for ZCUST_CALL_REC-kunnr .
ranges r_budat for zcust_call_rec-budat.
DATA: ITAB TYPE STANDARD TABLE OF ZCUST_CALL_REC WITH HEADER LINE,
JTAB TYPE STANDARD TABLE OF ZREMARKS WITH HEADER LINE.
*data:begin of itab occurs 0,
MANDT LIKE ZCUST_CALL_REC-MANDT,
kunnr like ZCUST_CALL_REC-kunnr,
budat like ZCUST_CALL_REC-budat,
code like ZCUST_CALL_REC-code,
remarks like ZCUST_CALL_REC-remarks,
end of itab.
*data:begin of Jtab occurs 0,
MANDT LIKE ZCUST_CALL_REC-MANDT,
kunnr like ZCUST_CALL_REC-kunnr,
budat like ZCUST_CALL_REC-budat,
code like ZCUST_CALL_REC-code,
remarks like ZCUST_CALL_REC-remarks,
end of Jtab.
CONTROLS:vcontrol TYPE TABLEVIEW USING SCREEN '9001'.
CONTROLS:vcontrol1 TYPE TABLEVIEW USING SCREEN '9002'.
*start-of-selection.
*& Module USER_COMMAND_9000 INPUT
text
MODULE USER_COMMAND_9000 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
WHEN 'ENQUIRY'.
perform multiple_selection.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9001'.
WHEN 'UPDATE'.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9002'.
perform update on commit.
WHEN 'DELETE'.
perform append_CUSTOMER_code.
PERFORM SELECT_DATA.
call screen '9002'.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Module STATUS_9000 OUTPUT
text
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'ZCUSTOMER'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9001 INPUT
text
MODULE USER_COMMAND_9001 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
endcase.
ENDMODULE. " USER_COMMAND_9001 INPUT
*& Module STATUS_9001 OUTPUT
text
MODULE STATUS_9001 OUTPUT.
SET PF-STATUS 'ZCUSTOMER'.
SET TITLEBAR 'xxx'.
move itab-MANDT to zcust_call_rec-MANDT.
move itab-kunnr to zcust_call_rec-kunnr.
move itab-budat to zcust_call_rec-budat.
move itab-code to zcust_call_rec-code.
move itab-remarks to zcust_call_rec-remarks.
vcontrol-lines = sy-dbcnt.
ENDMODULE. " STATUS_9001 OUTPUT
*& Module USER_COMMAND_9002 INPUT
text
module USER_COMMAND_9002 input.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR sy-ucomm.
WHEN 'UPDATE'.
perform move_data.
UPDATE ZCUST_CALL_REC FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'RECORDS ARE UPDATED'.
ELSE.
MESSAGE E001(0) WITH 'RECORDS ARE NOT UPDATED'.
ENDIF.
WHEN 'DELETE'.
perform move_data.
DELETE ZCUST_CALL_REC FROM TABLE ITAB.
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'RECORDS ARE DELETED'.
ELSE.
MESSAGE E001(0) WITH 'RECORDS ARE NOT DELETED'.
ENDIF.
endcase.
endmodule. " USER_COMMAND_9002 INPUT
*& Module STATUS_9002 OUTPUT
text
module STATUS_9002 output.
SET PF-STATUS 'ZCUSTOMER1'.
SET TITLEBAR 'xxx'.
endmodule. " STATUS_9002 OUTPUT
*& Module update_table OUTPUT
text
module update_table output.
move itab-MANDT to zcust_call_rec-MANDT.
move itab-kunnr to zcust_call_rec-kunnr.
move itab-budat to zcust_call_rec-budat.
move itab-code to zcust_call_rec-code.
move itab-remarks to zcust_call_rec-remarks.
vcontrol-lines = sy-dbcnt.
endmodule. " update_table OUTPUT
***Selection Data
FORM SELECT_DATA.
SELECT mandt kunnr budat code remarks FROM zcust_call_rec INTO
table itab
WHERE kunnr IN r_kunnr AND BUDAT IN R_BUDAT.
ENDFORM.
****append vendor code
FORM APPEND_CUSTOMER_CODE.
clear r_kunnr.
clear itab.
clear r_budat.
refresh r_kunnr.
refresh itab.
refresh r_kunnr.
IF r_kunnr IS INITIAL
AND NOT v_kun_low IS INITIAL
AND NOT v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_high
IMPORTING
OUTPUT = r_kunnr-high.
r_kunnr-option = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND NOT v_kun_low IS INITIAL
AND v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
r_kunnr-SIGN = 'I'.
r_kunnr-OPTION = 'EQ'.
APPEND r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND v_kun_low IS INITIAL
AND NOT v_kun_high IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = v_kun_low
IMPORTING
OUTPUT = r_kunnr-low.
r_kunnr-SIGN = 'I'.
r_kunnr-OPTION = 'EQ'.
APPEND r_kunnr.
PERFORM V_BUDAT.
ELSEIF r_kunnr IS INITIAL
AND v_kun_low IS INITIAL
AND v_kun_high IS INITIAL.
IF SY-SUBRC = 0.
MESSAGE I003(0) WITH 'ENTER CUSTOMER NUMBER'.
CALL SCREEN '9000'.
ENDIF.
PERFORM V_BUDAT.
ENDIF.
ENDFORM.
FORM V_BUDAT.
IF R_BUDAT IS INITIAL
AND NOT v_BUD_low IS INITIAL
AND NOT v_BUD_high IS INITIAL.
r_budat-low = v_bud_low.
r_budat-high = v_bud_high.
r_budat-option = 'BT'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND NOT v_BUD_low IS INITIAL
AND v_BUD_high IS INITIAL.
r_budat-low = v_bud_low.
r_budat-high = v_bud_high.
r_budat-option = 'EQ'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND v_BUD_low IS INITIAL
AND NOT v_BUD_high IS INITIAL.
r_budat-HIGH = v_bud_HIGH.
r_budat-option = 'EQ'.
r_budat-sign = 'I'.
append r_budat.
ELSEIF R_BUDAT IS INITIAL
AND v_BUD_low IS INITIAL
AND v_BUD_high IS INITIAL.
IF SY-SUBRC = 0.
MESSAGE I002(0) WITH 'ENTER POSTING DATE'.
CALL SCREEN '9000'.
r_budat-low = ''.
r_budat-option = ''.
r_budat-sign = ''.
ENDIF.
ENDIF.
ENDFORM.
*& Form update
text
--> p1 text
<-- p2 text
form update .
commit work.
endform. " update
*& Form move_data
text
--> p1 text
<-- p2 text
form move_data .
clear itab.
refresh itab.
move-corresponding zcust_call_rec to itab.
MOVE ZCUST_CALL_REC-MANDT TO ITAB-MANDT.
MOVE ZCUST_CALL_REC-KUNNR TO ITAB-KUNNR.
MOVE ZCUST_CALL_REC-BUDAT TO ITAB-BUDAT.
MOVE ZCUST_CALL_REC-CODE TO ITAB-CODE.
MOVE ZCUST_CALL_REC-REMARKS TO ITAB-REMARKS.
APPEND ITAB.
delete itab where kunnr is initial.
endform. " move_data
thanks in adv
vidya
Maybe you are looking for
-
I upgraded to mountain lion a week ago and now on startup of my macbook pro, microsoft excel and word start up automatically and then crash? very strange can anyone please help? I have checked the login items under users and groups and there is nothi
-
F110: Volume of AP invoices
Hi All, We are experiencing an issue with running the Payment Run (F110) to process open AP invoices. We are processing the entire Fiscal Year (ex: 2010) worth of AP invoices but system is not able to handle due to huge data. The main problem seems t
-
Change authorization object in a derived role
Hi Gurus, What's happen if someone has added a new authorization object in a derived role? He has only changed some derived role, not the parent role, he added manually a new value in the authorization field. The parent role didn't changed. <u>Note:<
-
Is there any way to get the old web inspector back for the newest version of safari? Also, I can't seem to refresh the page when web inspector is open, what the heck?
-
Am trying to start up my MacBookAir but i couldn't, what should i do?
Hi, am trying to start up my MacBookAir, but i coudln't. it shows a message of "your computer restatred because of a perblom, because press any key or wait a few seconds to contuine starting up" . then am trying to enter my Password then again shutdo