Can anybody check my code plz!
in the folllowing code I want to get different partner type(parvw)
but its giving me only one constant value.
need help
REPORT YINTERACTIVEPROGRAM01.
*CREATED BY:
*DATE OF CREATION : *
*TABLE DECLARATION
TABLES:VBAK, "Sales Document: Header Data
VBKD, "Sales Document: Business Data
VBPA, "Sales Document: Partner
VBAP, "Sales Document: Item Data
ADRC, "Addresses (central address admin.)
T178T, "Conditions: Groups for Materials:text
T188T, "Pricing groups for customers
TVM1,
TVM1T, "Material pricing group 1: Description
TVM2,
TVM2T, "Material Pricing Group 2: Description
TVM3,
TVM3T, "Material Pricing Group 3: Description
TVM4,
TVM4T, "Material Pricing Group 4: Description
TVM5,
TVM5T, "Material Pricing Group 5: Description
SZA1_D0100,
TVLV , "Check table for release orders: Usage ID
TVLVT,
TVKGG, "Customer Condition Groups (Customer Master)
TVKGGT,
TPAR, "Business Partner: Functions
TPART,
TVAUT. "Sales Documents: Order Reasons: Texts
*SELECT OPTIONS
Select-options S_VBELN for vbak-vbeln.
*CREATING INTERNAL TABLES
TYPES:BEGIN OF TY_TAB,
VBELN LIKE VBAK-VBELN,
VKORG LIKE VBAK-VKORG,
ERDAT LIKE VBAK-ERDAT,
AUGRU LIKE VBAK-AUGRU,
BEZEI LIKE TVAUT-BEZEI,
BSTDK LIKE VBKD-BSTDK,
BSTDK_E LIKE VBKD-BSTDK_E,
BSTKD LIKE VBKD-BSTKD,
KDKG2 LIKE VBKD-KDKG2,
KONDA LIKE VBKD-KONDA,
MATNR LIKE VBAP-MATNR,
SPART LIKE VBAP-SPART,
KONDM LIKE VBAP-KONDM,
WAERK LIKE VBAP-WAERK,
NETWR LIKE VBAP-NETWR,
KWMENG LIKE VBAP-KWMENG,
VKAUS LIKE VBAP-VKAUS,
MVGR1 LIKE VBAP-MVGR1,
MVGR2 LIKE VBAP-MVGR2,
MVGR3 LIKE VBAP-MVGR3,
MVGR4 LIKE VBAP-MVGR4,
MVGR5 LIKE VBAP-MVGR5,
KUNNR LIKE VBPA-KUNNR,
POSTCODE1 LIKE ADRC-POST_CODE1,
POBOX LIKE ADRC-PO_BOX,
NAME1 LIKE ADRC-NAME1,
NAME2 LIKE ADRC-NAME2,
CITY1 LIKE ADRC-CITY1,
CITY2 LIKE ADRC-CITY2,
COUNTRY LIKE ADRC-COUNTRY,
STREET LIKE ADRC-STREET,
STRSUPPL1 LIKE ADRC-STR_SUPPL1,
STRSUPPL2 LIKE ADRC-STR_SUPPL2,
STRSUPPL3 LIKE ADRC-STR_SUPPL3,
NRART LIKE TPAR-NRART,
VTEXT1 LIKE TPART-VTEXT,
PARVW LIKE TPART-PARVW,
BEZE_I LIKE TVLVT-BEZEI,
VTEXT LIKE V_T178-VTEXT,
V_TEXT like V_T188-VTEXT,
BEZEI1 LIKE TVM1T-BEZEI,
BEZEI2 LIKE TVM2T-BEZEI,
BEZEI3 LIKE TVM3T-BEZEI,
BEZEI4 LIKE TVM4T-BEZEI,
BEZEI5 LIKE TVM5T-BEZEI,
VTEXT2 LIKE TVKGGT-VTEXT,
SMTP_ADDR LIKE ADR6-SMTP_ADDR,
END OF TY_TAB.
DATA: ITAB TYPE STANDARD TABLE OF TY_TAB WITH HEADER LINE.
*WRITING THE QUERY
SELECT A1~VBELN
A1~VKORG
A1~ERDAT
A1~AUGRU
A2~BSTDK
A2~BSTDK_E
A2~BSTDK
A2~KONDA
A2~KDKG2
A3~MATNR
A3~SPART
A3~KONDM
A3~WAERK
A3~NETWR
A3~KWMENG
A3~VKAUS
A3~MVGR1
A3~MVGR2
A3~MVGR3
A3~MVGR4
A3~MVGR5
A4~POST_CODE1
A4~PO_BOX
A4~NAME1
A4~NAME2
A4~CITY1
A4~CITY2
A4~COUNTRY
A4~STREET
A4~STR_SUPPL1
A4~STR_SUPPL2
A4~STR_SUPPL3
A5~BEZEI
A6~KUNNR
A7~NRART
A8~VTEXT
A9~PARVW
A10~BEZEI
A11~VTEXT
A12~VTEXT
A13~BEZEI
A14~BEZEI
A15~BEZEI
A16~BEZEI
A17~BEZEI
A18~VTEXT
A20~SMTP_ADDR
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM VBAK AS A1
JOIN VBKD AS A2
ON A1VBELN = A2VBELN
JOIN VBAP AS A3
ON A1VBELN = A3VBELN
LEFT OUTER JOIN VBPA AS A6
ON A2VBELN = A6VBELN
AND A2POSNR = A6POSNR
JOIN TPAR AS A7
ON A7PARVW = A6PARVW
*JOIN ADR6 AS A20
*ON A6ADRNR = A20ADDRNUMBER
JOIN ADRC AS A4
ON A6ADRNR = A4ADDRNUMBER
LEFT OUTER JOIN TVM1T AS A13
ON A3MVGR1 = A13MVGR1
LEFT OUTER JOIN TVM2T AS A14
ON A3MVGR2 = A14MVGR2
LEFT OUTER JOIN TVM3T AS A15
ON A3MVGR3 = A15MVGR3
LEFT OUTER JOIN TVM4T AS A16
ON A3MVGR4 = A16MVGR4
LEFT OUTER JOIN TVM5T AS A17
ON A3MVGR5 = A17MVGR5
JOIN TPART AS A8
ON A8PARVW = A6PARVW
LEFT OUTER JOIN T178T AS A11
ON A3KONDM = A11KONDM
AND A11~SPRAS = SY-LANGU
LEFT OUTER JOIN T188T as A12
ON A2KONDA = A12KONDA
AND A12~SPRAS = SY-LANGU
JOIN TPART AS A9
ON A6PARVW = A9PARVW
LEFT OUTER JOIN TVLVT AS A10
ON A1ABRVW = A10ABRVW
AND A10~SPRAS = SY-LANGU
LEFT OUTER JOIN TVAUT AS A5
ON A1AUGRU = A5AUGRU
AND A5~SPRAS = SY-LANGU
LEFT OUTER JOIN TVKGGT AS A18
ON A8SPRAS = A18SPRAS
UP TO 100 ROWS
WHERE A1~VBELN IN S_VBELN.
*PRINTING THE OUTPUT
loop AT ITAB.
WRITE :
/(30) 'Order No :', itab-VBELN,
/(30) 'Sales Org :', itab-VKORG,
/(30) 'Order Date :', itab-ERDAT,
/(30) 'Purchase Order # :', itab-BSTKD,
/(30) 'Purchase Order Date :', itab-BSTDK,
/(30) 'Order Reason code :', itab-AUGRU,
/(30) 'Order Reason description :', itab-BEZEI,
/(30) 'Partner Type :', itab-NRART,
/(30) 'Partner Type description :', itab-VTEXT,
/(30) 'Partner no :', itab-KUNNR,
/(30) 'Partner Name1 :', itab-NAME1,
/(30) 'Partner Name2 :', itab-NAME2,
/(30) 'Partner Address 1 :', itab-STREET,
/(30) 'Partner Address 2 :', itab-STRSUPPL1,
/(30) 'Partner Address 3 :', itab-STRSUPPL2,
/(30) 'Partner Address 4 :', itab-STRSUPPL3,
/(30) 'City :', itab-CITY1,
/(30) 'DISTRICT :', itab-CITY2,
/(30) 'Country :', itab-COUNTRY,
/(30) 'Post Code :', itab-POSTCODE1,
/(30) 'PO BOX :', itab-POBOX,
/(30) 'Partner email :', itab-SMTP_ADDR,
/(30) 'Material no :', itab-MATNR,
/(30) 'Material Division :', itab-SPART,
/(30) 'Product Line and Edition code:', itab-MVGR1,
/(30) 'Product Line and Edition Desc:', itab-BEZEI1,
/(30) 'Product Name code :', itab-MVGR2,
/(30) 'ProductName Desc :', itab-BEZEI2,
/(30) 'Product Version Code :', itab-MVGR3,
/(30) 'Product Version Desc :', itab-BEZEI3,
/(30) 'Product Platform Code :', itab-MVGR4,
/(30) 'Product Platform Desc :', itab-BEZEI4,
/(30) 'Product App Server Code :', itab-MVGR5,
/(30) 'Product App Server Desc :', itab-BEZEI5,
/(30) 'Compiler Code :', itab-KONDM,
/(30) 'Compiler Desc :', itab-VTEXT,
/(30) 'LanguageCode :', itab-KONDA,
/(30) 'LanguageDesc :', itab-V_TEXT,
/(30) 'Runtime Band Code :', itab-VKAUS,
/(30) 'Runtime Band description :', itab-BEZE_I,
/(30) 'Support Start Date :', itab-BSTDK,
/(30) 'Support End Date :', itab-BSTDK_E,
/(30) 'Support Level Code :', itab-KDKG2,
/(30) 'Support Level Desc :', itab-VTEXT2,
/(30) 'Order Quantity :', itab-KWMENG,
/(30) 'Net Price :', itab-NETWR,
/(30) 'Currency :', itab-WAERK.
uline.
ENDLOOP.
if sy-subrc <> 0.
write : / 'No data found'.
endif.
Hi,
Performence wise its not better to use join on more than 3 tables.
It will take lot of time in production because of large data from sales tables.
Most of all your tables are transactional tbales.so you can expect large volume of data in production server even you dont find much difference in development system.
you have to decomment the below lines otherwise we get syntax error.
JOIN ADR6 AS A20
ON A6ADRNR = A20ADDRNUMBER
you can go for FOR ALL ENTRIES version instead of using join on those tables.
Regds
Sivaparvathi
Please reward points if helpful..
Similar Messages
-
Facetime is just disappeared from my iphone 6 can anybody help me out plz
facetime is just disappeared from my iphone 6 can anybody help me out plz
Where did you get the phone? FaceTime is banned in some countries in the Middle East. What had you done before it disappeared; did you possibly reset or restore the phone?
If the above is not the issue, if you use Search by dragging down your finger from the center of the screen and you search for "Facetime" does it appear as an app? If it does, then you must have moved it into a folder or another page of the Home screen. If it is in a folder the folder name will be displayed. -
Can someone check this code?
What I am trying to achieve is an "active" button state. I
have six buttons. When one is clicked, i need it to change to a
color which denotes that it is the active button.
someone provided me with this code, but I can't seem to get
it to work. I followed the directions precisely.
The directions were as follows:
One thing I think you could do is create another invisible
layer of buttons above all your other buttons. You could make them
all invisible, unless a button is clicked.
Let's say your original layer of buttons is called a_but,
b_but, and c_but.
Then you could have another invisible layer of buttons called
invA_but, invB_but, and invC_but. This layer of buttons would each
be the color you want displayed while the button is selected. The
code would look something like-
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=false;
a_but.onRelease=function(){
invA_but._visible=true;
invB_but._visible=false;
invB_but._visible=false;
b_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=true;
invC_but._visible=false;
c_but.onRelease=function(){
invA_but._visible=false;
invB_but._visible=false;
invC_but._visible=trueinvA_but, invB_but, and invC_but refer to instance names for
your buttons, not layer names as suggested in the description. It
should work if you have the instance names for the buttons right. I
would probably add code to make the nomal state invisible instead
of just having the active button covering the inactive one. EX:
a_but.onRelease=function(){
invA_but._visible=true; //show the buttons active state
a_but._visible = false; //hide the off state of the button
invB_but._visible=false; //hides the active state of button b
invC_but._visible=false; //hides the active state of button c -
How to implement the RemoveLast function in a link list? check my code plz
Hi guys,
How to delete the last element in a user defined linklist. I am using the following code to find the last element of the list. It works fine, but i don't know how to remove that element ...
public Object getRear()
rear=front;
while (rear !=null)
if (rear.getNext()!=null)
rear=rear.getNext();
else
break; //rear Node found
if (rear !=null) //list is not empty
return rear.getData();
return null; //list is empty
}Sorry, I missed out on returning the last element:
public Object delRear() {
// I assume front is an instance field pointing to the first element
if(front != null) { // list contains something
Element rear, pred; // I assume you have some type like this
// determine predecessor of last element
rear = front;
pred = null;
while(rear.getNext() != null) {
pred = rear;
rear = rear.getNext();
if(pred == null) front = null; // delete only element
else pred.setNext(null); // delete last element
return rear; // return deleted element
else return null; -
Can anybody explain this code ?
try {
InetAddress addr = InetAddress.getByName("java.sun.com");
byte[] ipAddr = addr.getAddress();
String ipAddrStr = "";
for (int i=0; i<ipAddr.length; i++) {
if (i > 0) {
ipAddrStr += ".";
ipAddrStr += ipAddr&0xFF;
} catch (UnknownHostException e) {Man, that's a hideous piece of code. Judging from
this line (I'm assuming the array index)...
ipAddrStr += ipAddr&0xFF;
...the code was cribbed from some other code that
applied a bitmask by someone who didn't know the API
very well, but was somewhat familiar with C.
Actually, if the method to retrieve the IP as a string didn't exist, that's exactly what I'd do. The array returned by InetAddress.getAddress() is a byte[] and, since Java uses only signed data types, you wouldn't want to inadvertently get a string containing "-64.-88.0.1" instead of "192.168.0.1".
You'll note that "& 0xFF" is a mask to an integer constant. That means that the byte (ex., -127 or 0x81) gets upcasted to an integer first (0xFFFFFF81) and then everything but the lowest order byte is cleared (0x00000081) which, indeed, gives us the "unsigned" version of that byte.
It's not at all pretty, of course. But it is pretty much the best way I know to get a value from 0-255 out of a byte in Java.
EDIT:
Oh, btw... you won't get any disagreement from me on the topic of the person not knowing the API very well. :) -
How to change thecontract account using bapi can anybody provide the code
How to change the contract account using BAPI_CTRACCONTRACTACCOUNT_CH1.
pls reply.
i will reward points .Hi Archana,
The best way would be to read the BAPI documentation and check if they provided an example. If there is no example, test the BAPI in SE37 using your test data. Also, do not forget to call the 'BAPI_TRANSACTION_COMMIT' after the BAPI call (using test sequence in SE37).
Regards,
Shyam -
Can anybody explain dis code for calling constructors in main method?
it is used in netbeans IDE and m nt getting what is happening here
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainMenu().setVisible(true);
}Note: This thread was originally posted in the [New To Java|http://forums.sun.com/forum.jspa?forumID=54] forum, but moved to this forum for closer topic alignment.
-
Utilities tat can be checked through db13
Hello Experts,
i hv seen transaction db02, there r a lot of options that can be checked through it, plz tell wt all can be checked along with details.
Secondly in it ,there are two options there like checking space critical objects and missing indexes ,what are they for ,and wt do they mean? and incase if there are
space critical objects and missing indexes then how do we rectify them?
Requested to revert at earliest as this is urgent. Points guaranteed.
Regards,
SomyaHello Eric,
I wld hv appreciated if i had got an reply with deatlied info frm ur side. I read through the first help link ,got some idea but am confused abt wt does index really indicate in oracle? If suppose both both primary and secondary indexes are missing in the database ,how do we need whether we should create those indexes ,they r relevant or whether we shld not?
Secondly i could not understand ur second link regarding space critical objects ,it doesnt mention anything abt tat ,if u could detail over it, it shall be helpful.
Regards,
Somya -
i bought a iphone 3g from market yesterday and the phone is showing a usb an also itunes logo on the screen, the ive tryed restore and update, but once this has finished it gives me erra code (1015) can anybody help me plz
Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
http://support.apple.com/kb/TS3694#error1015. -
i have a problem in enabling webserver i get message labview webserver not running error 54 , i checked IIS Manager and www the services r running ok ..can anybody tell what might be error ,,,iam on labview 6.1 and win 2003 server.,
If you already have IIS web server running, you need to run the LabVIEW web server on a different port to avoid conflicts. It probably won't start because the port 80 is already in use.
Check options.."Web Server: Configuration" within LabVIEW.
LabVIEW Champion . Do more with less code and in less time . -
Can anybody give me the jdbc code for postgres database.
Hello all,
I tried to search for sample jdbc code for postgres. But I couldn't find working sample. Can anybody please post the sample jdbc code for connecting to postgres database.
I have already added the jar file, "postgresql-8.0-312.jdbc3.jar" to the build path.
Thanks.
SrinivasHi,
Thanks for your reply!
I wrote the following code, but the insert doesn't add a row.
try {
Class.forName("org.postgresql.Driver");
//Preparing Conenction String
Connection con = DriverManager.getConnection("jdbc:postgresql://<name>:5432/sales_office_test", "sales_office_data","sales_office_data");
PreparedStatement prepSt = con.prepareStatement(
"INSERT INTO office_personnel (office_id, salutation, firstname, lastname, email_address,"
+ " cellphone, phonenumber, extension, password, username) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
prepSt.setString(1, newOfficeIds);
prepSt.setString(2, whopperUserSalutation);
//Close statement
prepSt.close();
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}If I print the connection object I get
Sql connection value: org.postgresql.jdbc3.Jdbc3Connection@10965c3 I double checked the same query by directly executing it on the web interface to the postgres, works fine there and creates the row...
What could be wrong.
Thanks
Srinivas -
I need to check three comparative conditions and for each status I need to perform some action. can anybody please suggest
Requirment:
Need to check if a numeric value is within a number range by using comparative function. Depending on status i need to ggive a constant input to numeric function.Easiest is suing an array of range boundaries, e.g. as follows:
(Found here)
Now it is fully scalable and independent of the number of ranges. The solution in the earlier post would get complicated quickly whenever the number of ranges or boundary locations changes.
LabVIEW Champion . Do more with less code and in less time . -
Everytime I turn on iTunes it say it wasn't installed properly and can't burn CD's. However all my music is there for me to listen to on my iPod Nano.
I want to unistall iTunes and it allows me to go through the process until about 2% is waiting for uninstall and then I get an error message that says it couldn't complete the uninstall and gives me an error code of 2330.
Can anybody please help me. iTunes wants to charge $19.
Thank you.ive never had any problems with ap[ple products in the past... this is a first and a stupid problem if you ask me
-
My icloud account is not verifying it says check my mail witch I have done and I get a message say your iPhone for has been used to set up and Icloud account but still can not use the icloud can anybody help me.
Be sure you are checking the email account that you used to set up the Apple ID you used to create the iCloud account. Also, be sure to check your spam/junk folder as well as your inbox. The email you should receive looks like the image below. When you get it, click the Verify Now link.
If it still isn't there, try going to https://appleid.apple.com, click Manage your Apple ID, sign in, click on Name, ID and Email addresses on the left, then to the right look for a link to resend the verification email. -
Hi my icloud is telling me to verify my account - check my e-mail on how to verify but I havent had an e-mail to verify and i seem to keep going round in circles can anybody help please?
Perhaps that email you're waiting for was blocked as spam or is in your junk folder. Something like that.
Maybe you are looking for
-
Issue in mapping compounding attribute
Hello All, I have info objects 0CO_AREA and 0PROFIT_CTR in the target whereas in the source i have only 0PROFIT_CTR and please note that CO_AREA is compounded with 0PROFIT_CTR. In the transformation, I have kept constant value for 0C0_AREA and info o
-
What's the difference between Transferred Records and Added Records?
When right click an ODS or a cube to select Manage, then under the 3rd tab called Requests, there are two columns called Transferred Records and Added Records, what's the difference between these two? Thanks
-
Laptop won't power on after making three beeps
This thread has been moved to another message board. Click the link to jump to its new location.
-
Emails, web history, and documents not filed in chronological order
I have brought this issue to this forum on the advice of others. My computer is not "filing" items in chronological order. This applies to emails (sent and received), web histories, created and modified info for MS Word documents, etc. Occasionally,
-
Hi, I am currently working on a project which involves a large chunk of Labview programming. I am new to Labview but am relatively experienced with C. I have designed an algorithm for C that I am currently trying to "translate" into Labview. The alg