Standard program to fetch the article number from the EAN
Hi all,
Is there any standard report, that retrieves the article number from the EAN provided. I don't require a function module which satisfies this requirement.
Kindly provide your valuable inputs.
Thanks & Regards,
Revathi.
Here is code that can fetch any site.
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class fetchresult extends Frame implements ActionListener{
TextField t1;
TextArea ta;
Button b1;
public fetchresult(){
super("Fetch Result");
t1=new TextField("http://www.sitename.com",20);
b1=new Button("Get");
ta=new TextArea("",20,80);
setLayout(new FlowLayout());
add(t1);
add(b1);
b1.addActionListener(this);
add(ta);
setSize(200,200);
setVisible(true);
public void actionPerformed(ActionEvent e)
try
String s = t1.getText();
URL u = new URL(s);
URLConnection uc = u.openConnection();
InputStream is = uc.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String str;
while((str = rd.readLine()) !=null){
ta.append(str);
ta.append("\n");
rd.close();
int available = is.available();
int z;char c;
for(int x=0;x<available;x++){
z=is.read();
c=(char)z;
ta.append(String.valueOf(c));
catch(Exception ee){ta.append(ee.toString());}
public static void main(String args[]){
fetchresult obj = new fetchresult();
Manu
Similar Messages
-
Is there any standard program or FM to configure mail from SAP?
Hi Experts,
Is there any standard program or FM to configure mail from SAP?
Regards
Ramesh VHi Ramesh,
PFB.
You can use function SO_NEW_DOCUMENT_SEND_API1
Have a look at URL-> http://sapr3.tripod.com/abap011.htm
Check the below forum:
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
Regards,
Faisal. -
Need a program to fetch the data from the package and delete the programs
i need a program which uses the selection screen as input parameters which should accept as package and after execution it should show all the programs in the list and then the programs should be deleted from the package.
Hi
Use below query to fetch programs from the entered dev Class
SELECT * FROM tadir into table itab
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND devclass = p_class.
In the program we can delete records from Tadir by looping ITAb,
but other program related tables will have this entry .
Hope this Helps.
Praveen -
How to fetch accounting document number from known material document number
Hi,
Using MIGO transaction, by giving mblnr(material document number) as input, I get accounting document number by clicking FI document.I have to add this accounting document number in my report for corresponding known mblnr(material document number) values.
My question is how to fetch the accounting document number present in MIGO to add in my report program.
I used the xblnr(Reference Document Number) which is present both in mkpf and bkpf tables to fetch values.
I extracted xblnr values with known mblnr values from mkpf (Header: Material Document table).
and then extracted belnr(accounting document number) from bkpf (Accounting Document Header table) by using xblnr values.
But the query is running for a long time.
Is there any other method to extract the values in a simpler way.
Kindly advise.
Thanks and Regards,
SanjeevI had the values of xblnr and some other fields such as mblnr, budat etc in wi_item table.
I created a new internal table i_xblnr and got down those values.
And then created a new internal table i_belnr and tried to get values of belnr in it.
The code I wrote is given below:
IF not wi_item[] is initial.
loop at wi_item.
at new xblnr.
ws_xblnr-xblnr = wi_item-xblnr.
append ws_xblnr to i_xblnr.
endat.
endloop.
select belnr xblnr from bkpf into table i_belnr for all entries in i_xblnr where xblnr = i_xblnr-xblnr.
ENDIF.
Kindly look after it.Thank you.
Regards,
Sanjeev -
Standard reports for fetching the Material Characteristics
Hi,
Do we have any standard reports in SAP for fetching the Material Characteristics.
Regards,
SivDear,
Check the related links... may be helpful:
To fetch characteristic value (ATWRT) from material number
Material characteristics datasource
Characteristics Table ?
Characteristics Table ?
Regards,
Syed Hussain. -
Any Standard Program to upload the financial data
Hi Team,
Any standard program which will upload the financial data(trail balance) into sap fi.
The scenario is that there are few company codes which is not in sap and we need to upload their financial data in sap like trail balance, I need to upload this company code data in sap fi, please suggest some standard program which uploads this data.
Thanks in advance
Kind Regards
sridharHi,
Standard programs are there, but those dont fit to your requirement.
e.g. Based on the account type(D, K, S) there are different different fields should be filled up.
If it is Vendor invoice, you have to capture Inv.no., text, leacy subledger number if required.
All these fields are not required for GL data upload.
Better create 3 LSMW'S for GL, Vedor & Customers.
Rgds
Murali. N -
Any Standard Class to Fetch the PayRoll Result
Hi Experts,
There is any standard class or method to fetch the details in the Pay Result(RT CRT Tables) from PC_payresult T-code in HR PayRoll module.
Thanks,
P.s.RajCheck classes CL_HR_PAY_RESULT*
Personally I never used it. Classical FM approach for getting payroll results is a confident and reliable way of extracting clusters, you may use these
CU_READ_RGDIR
PYXX_READ_PAYROLL_RESULT
CD_READ_DATE_RANGE_ACTUAL_NV
CD_EVALUATION_PERIODS
CD_READ_PREVIOUS
CD_READ_PREVIOUS_ORIGINAL
CD_RETROCALC_PERIOD
CD_PAYROLL_UNTIL
CD_HIGHEST_PAYDT
H99_DISPLAY_PAYRESULT
Regards
Marcin -
Is it possible to copy a Standard Program along with the enhancements?
Hi Friends,
I need to copy the program RMCE0400 (Transaction: MC$K) and modify the selection screen and select queries based on the select options.
I copied the standard program to a Z Program but the enhancements were not copied automatically.
So i copied the codes in those enhancements and pasted them in the Z Program.
But it does not replicate the selection screen as well as the output of the standard program.
Can you tell me whether there is any other way to incorporate the codes in the enhancements of the standard program to the Z Program?
Is it possible to copy the enhancements?
I can use the enhancements to enhance the standard program, but the user wants to create a new T-Code with the copied and modified program.
So can anyone let me know if there is any way to do so?
Edited by: Arunkumar Balasubramaniam on Jun 11, 2010 11:42 AMYes per this
http://download.p4c.philips.com/files/p/ppx2480_eu/ppx2480_eu_dfu_eng.pdf
The device has
Video connection .................................Mini-HDMI socket
Thus you will need an HDMI to min HDMI adopter -
Standard bapi to fetch the line managers for particular User
Hi,
Is there any BAPI to fetch the Line Managers for particular user. If so could any one help me out with the same.
Regards,
RamHi Ram
Please check
SWX_GET_MANAGER
HRCM_ORGUNIT_MANAGER_GET
Check the following thread
Function module to get Manager
Regards,
Arun -
Any sample program to fetch data with JSP from MySQL
Hi,
Anybody can you ple give me a sample code to fetch data from MySQL and show it.
Database server : localhost
Databasename : test
Database User : root
Database Password : (database have no password)
Table Name : category
Table column name : catName
I am trying the following code, but it gives error:
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost:3306/test";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>
<html><body>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "root", "");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT * FROM category");
while (rs.next()) {
out.println(rs.getString("catName")+"<br>");
rs.close();
%>
</body></html>
any help is appreciated.
---SujoyJust replace the following code. I think it will work for u.
<%@ page import="java.sql.*" %>
<%
try{
String connectionURL = "jdbc:mysql://localhost:3306/test";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT * FROM category");
%>
<html><body>
<table>
<%
while(rs.next())
%>
<tr><td><%=rs.getString("catName")%></td></tr>
<%
%>
</table>
</body>
</html>
<%
rs.close();
statement.close();
connection.close();
catch(Exception e)
e.printStackTrace();
finally()
try{
rs.close();
statement.close();
connection.close();
catch(Exception e)
e.printStackTrace();
%> -
Standard Program that will used to pick up Inbound delivery frm VL32N
Hi,
I am creating one smart form, in that i have to pick up LIKP-VBELN from transaction VL32N (Inbound delivery) to display some fields in the smart form based on the inbound delivery doc(VBELN from VL32N).
I am unable to find the standard program where this LIKP-VBELN is already flowing, so i can get the delivery doc from that standard program and fetch the required fields based on that.
Please help me.......
Thanks In advance,,,,,,
Best Regards,
Abnish JainAnswered
-
How to fetch the latest change number from CDPOS Table..?
Hi All,
im trying to fetch teh change number from CDPOS with the below select, but my requirement is always i wants to fetch the latest change number.
SELECT SINGLE objectid changenr FROM cdpos
INTO wa_cdpos
WHERE objectid = wa_e1kna1m-kunnr
AND ( tabname = 'KNA1' OR tabname = 'KNVV')
AND fname = 'AUFSD'
AND ( value_new = '01' OR value_new = space ).
Please let me know how to achive this..?
Ashoktry this way
" SELECT SINGLE objectid changenr FROM cdpos
" INTO wa_cdpos
SELECT objectid changenr FROM cdpos
INTO table t_cdpos
WHERE objectid = wa_e1kna1m-kunnr
AND ( tabname = 'KNA1' OR tabname = 'KNVV')
AND fname = 'AUFSD'
AND ( value_new = '01' OR value_new = space ).
SORT t_cdpos by changenr Descending.
read t_cdos index 1. "this is the latest change
Prabhudas -
Error While executing the Standard Program RSEINB00
Hi,
I am trying to execute the Standard Program RSEINB00.
The input parameters for this program are
1. File path along with name
2. Port.
File path I am giving the application server directory along with the filename.
For port. i have created a port in WE21.
For both outbound parametes I selected the Physical directory and gave directory name and file name in both tabs and saved the port definition.
Now I am passing the port to the RSEINB00 program.
it is giving an error File cannot be opened.
Can any one help me on this. Can someone guide me how to use RSEINB00 to read file from application server.
thanksHi,
I think,you missed out some steps while creating Port.so please follow the below steps to resolve the issue.
we21->click on your port number->outbound file tab->function module: EDI_PATH_CREATE_MESTYP_DOCNUM.
outbound file: give file name .txt.
and give the physical directory : /usr/sap/.......................................txt and save.
and click on 'ACESS TEST' button and check any error is coming.
go to outbound trigger tab-> give RFC destination name which we have created under a port in SM59.
and one more important thing is check your unicode status is active or not.
.Please get back me .if any issues.
Kiran J -
Fetch Sales Order number VBELN from Purchase requisition number BANFN
Hi,
I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
Kindly suggest a suitable method for this.
I've used the query as folllows:
select single vbeln banfn
from vbep
into (wa_vbep-vbeln, wa_vbep-banfn)
where banfn eq wa_eban_zdd1_x-banfn.
where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
Scenario in brief described below:
Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
in this case, only one sales order is created corresponding to a preq..
BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
then we check if the sales order corresponding to the preq is in open status...
for this i need to programmatically fetch the sales order number corresponding to the preq...
this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
no other way i could find to fetch sales order number corresponding to the preq number....
there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
Guess i couldnt find anyother way...
Thanks.I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
I used the select query as follows:
select single vbeln banfn
from vbep
into (wa_vbep-vbeln, wa_vbep-banfn)
where banfn eq wa_eban_zdd1_x-banfn.
where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
I tried a few other combinations also, but those also didnt work effectively:
select vbeln banfn
from vbep
into (wa_vbep-vbeln, wa_vbep-banfn)
where banfn eq wa_eban_zdd1_x-banfn.
without using SINGLE in the select query as the select query would implicitly pickup only a single record,
select vbeln banfn
from vbep
into wa_vbep
where banfn eq wa_eban_zdd1_x-banfn.
and another query where the INTO statement was directed directly to a workarea.
But unfortunately, nothing seemed to be working.
The index i had created was on BANFN alone in the VBEP table. -
Fetch the netprice from the validity period which always matches with the
Let me describe the same.
Suppose the PO creation date is 04.07.2007
The conditions for an item in a contract for the PO are as follows;
1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
We need to always fetch the netprice from the validity period which always matches with the PO creation date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
This data is then used to fetch the get the netpr data from EKPO.
what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date..
Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
p_c_k_bstyp TYPE ebstyp
p_p_bukrs TYPE bukrs
p_p_ekorg TYPE ekorg
p_p_ekgrp TYPE bkgrp
*Begin of Mod-004
fp_p_cernam type ty_r_ernam
p_p_cernam TYPE ernam
*End of Mod-004
p_s_werks LIKE s_werks[]
p_s_matnr LIKE s_matnr[]
p_s_lifnr LIKE s_lifnr[]
p_s_val_dt LIKE s_val_dt[].
*mod-002
data : l_amount type BAPICURR_D, " Net price
l_waers TYPE waers, " Currency Key
l_eff_amount type BAPICURR_D. " Effective value
data: l_v_netpr type bprei.
*mod-002
SELECT ebeln
bukrs
bstyp
aedat
ernam
lifnr
zterm
ekorg
ekgrp
waers
wkurs
kdatb
kdate
inco1
INTO TABLE i_ekko
FROM ekko
WHERE ebeln IN p_s_cebeln
AND bstyp EQ p_c_k_bstyp
AND bukrs EQ p_p_bukrs
AND ekorg EQ p_p_ekorg
AND ekgrp EQ p_p_ekgrp
*Begin of Mod-004
AND ernam EQ p_p_cernam
AND ernam IN fp_p_cernam
*End of Mod-004
AND lifnr IN p_s_lifnr
AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
IF sy-subrc EQ 0.
Populates internal table i_ekpo using EKPO table.
SELECT ebeln
ebelp
loekz
txz01
matnr
werks
ktmng
menge
meins
bprme
netpr
peinh
webaz
mwskz
uebto
untto
erekz
pstyp
knttp
repos
webre
konnr
ktpnr
ean11
effwr
xersy
aedat
prdat
INTO TABLE i_ekpo
FROM ekpo
FOR ALL ENTRIES IN i_ekko
WHERE ebeln = i_ekko-ebeln
and aedat = i_ekko-aedat
AND werks IN p_s_werks
AND matnr IN p_s_matnr.
LOOP AT i_ekpo INTO rec_ekpo.
MOVE rec_ekpo-ebeln TO rec_contr-ebeln.
MOVE rec_ekpo-ebelp TO rec_contr-ebelp.
MOVE rec_ekpo-loekz TO rec_contr-loekz.
MOVE rec_ekpo-txz01 TO rec_contr-txz01.
MOVE rec_ekpo-matnr TO rec_contr-matnr.
MOVE rec_ekpo-werks TO rec_contr-werks.
MOVE rec_ekpo-ktmng TO rec_contr-ktmng.
MOVE rec_ekpo-menge TO rec_contr-menge.
MOVE rec_ekpo-meins TO rec_contr-meins.
MOVE rec_ekpo-bprme TO rec_contr-bprme.
MOVE rec_ekpo-netpr TO rec_contr-netpr.
move l_v_netpr TO rec_contr-netpr.
mod-002
read table i_ekko into rec_ekko with key
ebeln = rec_ekpo-ebeln.
l_waers = rec_ekko-waers.
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-netpr
IMPORTING
AMOUNT_EXTERNAL = l_amount.
rec_contr-netpr = l_amount.
mod-002
MOVE rec_ekpo-peinh TO rec_contr-peinh.
MOVE rec_ekpo-webaz TO rec_contr-webaz.
MOVE rec_ekpo-mwskz TO rec_contr-mwskz.
MOVE rec_ekpo-uebto TO rec_contr-uebto.
MOVE rec_ekpo-untto TO rec_contr-untto.
MOVE rec_ekpo-erekz TO rec_contr-erekz.
MOVE rec_ekpo-pstyp TO rec_contr-pstyp.
MOVE rec_ekpo-knttp TO rec_contr-knttp.
MOVE rec_ekpo-repos TO rec_contr-repos.
MOVE rec_ekpo-webre TO rec_contr-webre.
MOVE rec_ekpo-konnr TO rec_contr-konnr.
MOVE rec_ekpo-ktpnr TO rec_contr-ktpnr.
MOVE rec_ekpo-ean11 TO rec_contr-ean11.
MOVE rec_ekpo-effwr TO rec_contr-effwr.
mod-002
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-effwr
IMPORTING
AMOUNT_EXTERNAL = l_eff_amount.
rec_contr-effwr = l_eff_amount.
*mod-002
MOVE rec_ekpo-xersy TO rec_contr-xersy.
APPEND rec_contr TO i_contr.
CLEAR: rec_ekpo,rec_contr.
mod-002
CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
mod-002
ENDLOOP.
Modifying i_contr using i_ekko.
SORT i_ekko BY ebeln.
LOOP AT i_contr INTO rec_contr.
READ TABLE i_ekko INTO rec_ekko WITH KEY
ebeln = rec_contr-ebeln
BINARY SEARCH.
MOVE rec_ekko-bukrs TO rec_contr-bukrs.
MOVE rec_ekko-bstyp TO rec_contr-bstyp.
MOVE rec_ekko-aedat TO rec_contr-aedat.
MOVE rec_ekko-ernam TO rec_contr-ernam.
MOVE rec_ekko-lifnr TO rec_contr-lifnr.
MOVE rec_ekko-zterm TO rec_contr-zterm.
MOVE rec_ekko-ekorg TO rec_contr-ekorg.
MOVE rec_ekko-ekgrp TO rec_contr-ekgrp.
MOVE rec_ekko-waers TO rec_contr-waers.
MOVE rec_ekko-wkurs TO rec_contr-wkurs.
MOVE rec_ekko-kdatb TO rec_contr-kdatb.
MOVE rec_ekko-kdate TO rec_contr-kdate.
MOVE rec_ekko-inco1 TO rec_contr-inco1.
MODIFY i_contr FROM rec_contr.
ENDLOOP.
ENDIF.
REFRESH: i_ekko,
i_ekpo.
CLEAR : rec_ekko,
rec_ekpo,
rec_contr.
ENDFORM. "select_contracts
Thanks.Hi,
Please get the valid condition ( based on date ) from A016 (MK & LPA). With the appropriate KNUMH read the Condition header. You can access the different condition items viz., PB00, RA00 etc., for the values from table KONP. Further if you have Value scales / Quantity scales, you can read the data from KONM, KONW.
An additional tips: in KONP, if you have a condition like RA00 - Rebate, the value will be multiplied by 10 and saven in database to accomodate the discount to the third decimal.
I could not completely understand your requirements like nature of development ( Is it a Report / SAP Script ??) you are working etc., so that I could help you precisely.
Hope this helps,
Best Regards, Murugesh AS
Message was edited by:
Murugesh Arcot
Maybe you are looking for
-
Creating multi-section templates in Pages 5 - how?
In Pages 4.3 you could define and name various multi-page sections that lived 'within' a document template, and then pick from these to build up a document. You could control these internal sections within the template using the "Manage Pages..." com
-
In quotation Req delivery date
In quotation Req delivery date coming today is default. Earlier it was mandatory vov8 I put tick mark. Then system taking today default. My client does not that like that. He is asking no default date and it should option entire. If they need they wi
-
Hi, there. I'm having problems: after the recent security update, I'm having trouble with certain applications. I have a mid 2007 Mac Mini, running Mac OS X 10•6•4, and I'm having trouble running Safari, iPhoto 07, and iTunes 10.01, most noticeably.
-
Hi, I know this isnt exactly on topic, but i do appreciate the thoughts of fellow Illustrator users and Im having a hard time with this.. For those of you that have online portfolios...what do you think is the best/easiest way of starting one? I do n
-
Connect to Canon Mx870 scanner after OS 10.9.4 update
Hi, world of Mac geniuses: after the 10.9.4 update, none of the Macs in my house (a 2010 iMac, a 2012 MacBook Pro, a 2014 MacBook Air) will recognize the scanner function on our networked Canon MX870 integrated scanner / printer. They all recognize i