Please chk the code
hi
SELECT SINGLE objky
FROM nast
INTO lv_objky
WHERE kappl EQ 'EF'
AND objky EQ lv_var
AND spras EQ 'EN'
AND parnr IN ('s7dclnt200', 's7qclnt450', 's7pclnt450')
AND parvw EQ 'LS'.
IF sy-subrc EQ 0.
endif.
this is my select query ..
in database i have the entry but i m getting sy-subrc not equal to 0. please let me know...
Hello Neha,
Here the Variable lv_var should be similar to the value in that table.
Check this
SELECT SINGLE objky
FROM nast
INTO lv_objky
WHERE kappl EQ 'EF'
AND objky EQ lv_var " Chekc here
AND spras EQ 'EN'
AND parnr IN ('s7dclnt200', 's7qclnt450', 's7pclnt450')
AND parvw EQ 'LS'.
IF sy-subrc EQ 0.
endif.
REgards,
Vasanth
Similar Messages
-
I AM TRYING TO REPLICATE THE ADDRESS OF EQUIPMENT FROM ECC TO CRM.
I AM ABLE TO REPLICATE THE IDENTIFICATION NUMBER.
WHILE USING THE SAME FUNCTION MODULE FOR ADDRESS, THE ADDRESS IS NOT GETTING REPLICATED.
PLEASE CHECK THE CODE AND TELL ME WHAT PRE-REQUISITES MUST BE TAKEN INTO CONSIDERATION AND IS THERE ANY MISTAKE FROM ME.
FULL POINTS WILL BE REWARDED.
ITS VERY VERY URGENT.
METHOD IF_EX_CRM_EQUI_LOAD~ENLARGE_COMPONENT_DATA.
**Data declarations
DATA:
ls_equi type crmt_equi_mess,
ls_comp type ibap_dat1,
ls_comp_det1 TYPE IBAP_COMP3,
ls_address_data type ADDR1_DATA,
ls_object type comt_product_maintain_api,
ls_object1 type comt_product,
lv_object_id type IB_DEVICEID,
lv_object_guid type IB_OBJNR_GUID16.
**Map Sort field from ECC to CRM
Read table it_equi_dmbdoc-equi into ls_equi index 1.
lv_object_id = ls_equi-equnr.
move is_object to ls_object.
move ls_object-com_product to ls_object1.
lv_object_guid = ls_object1-product_guid.
move is_component to ls_comp.
ls_comp_det1-deviceid = lv_object_id.
ls_comp_det1-object_guid = lv_object_guid.
ls_comp_det1-EXTOBJTYP = 'CRM_OBJECT'.
ls_comp_det1-ibase = ls_comp-ibase.
ls_address_data-roomnumber = '1000'.
ls_address_data-floor = '10'.
ls_address_data-country = 'US'.
CALL FUNCTION 'CRM_IBASE_COMP_CHANGE'
EXPORTING
i_comp = ls_comp
I_COMP_DET = ls_comp_det1
I_ADDRESS_DATA = ls_address_data
I_ADDRESS_ADMIN =
I_PARTNER =
I_DATE =
I_TIME =
EXCEPTIONS
DATA_NOT_CONSISTENT = 1
IBASE_LOCKED = 2
NOT_SUCCESFUL = 3
OTHERS = 4
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
ENDMETHOD.Hi S B,
May I the procedure for the replication of serialnumber into device ID that is Identification field In Ibase.
And one more thing need this to be codded in the standard badi or needed an copy of the implementation .
plz help me as u already have done the requirement.
u will be twice rewarded.
Thanking u in advance for the reply.
Sree. -
Please check the Code snippet and detail the difference
Please go through the two code snippets given below...
Can some one please let me know if using generics is a better way to denote the signature and if yes, why is it so?
Thank you
Two classes:
class SimpleStr {
String name = "SimpleStr";
public SimpleStr(String name) {
this.name = name;
public String getName() {
return this.name;
public String toString() {
return getName();
class MySimpleStr extends SimpleStr {
String name = "MySimpleStr";
public MySimpleStr(String name) {
super(name);
this.name = name;
public String getName() {
return this.name;
public String toString() {
return getName();
Code Snippet 1:
class AnotherSimpleStr {
public <S extends SimpleStr>S getInfo() {
return (S)new MySimpleStr("val3");
Code Snippet 2:
class AnotherSimpleStr {
public SimpleStr getInfo() {
return new MySimpleStr("val3");
}Also, please see the code below, the getInfo() method is not taking care of Type safety right??!!!!
class AnotherSimpleStr {
public <S extends SimpleStr>S getInfo() {
return (S)new Object();
public <S extends SimpleStr>S getInfoAgain(Class<S> cls) {
return (S)new MySimpleStr("Val");
} -
Please check the code reg mail implementation and give guide lines to me
Hi experts
I written some code for implementing the mail in webdynpro using java mail API,i did not get the out put ,Is any configuration i have to do in webdynpro or WAS
Can any body review my code and tell me where i mistaken in the implementation .Is there any thing i want to configure .Here with i am sending my code in the action of Send button
public void onActionSendMail(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionSendMail(ServerEvent)
// get the values entered by the user in the form
try{
String toAddress=wdContext.currentContextElement().getTo();
String ccAddress=wdContext.currentContextElement().getCC();
String bccAddress=wdContext.currentContextElement().getBCC();
String subject=wdContext.currentContextElement().getSubject();
String messageBody=wdContext.currentContextElement().getMessage();
//set the properties of host and port no
Properties p = new Properties();
p.put("mail.transport.protocol","smtp");
p.put("mail.smtp.host","12.38.145.108");
p.put("mail.smtp.port","25");
//get the session object or connection to the mail server or host
Session sess=Session.getDefaultInstance(p,null);
//create a MimeMessage and add recipients
MimeMessage message = new MimeMessage(sess);
if(toAddress !=null && toAddress.length()>0){
message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
}else
wdComponentAPI.getMessageManager().reportSuccess("Please Enter the To Address");
if(bccAddress !=null && bccAddress.length()>0)
message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bccAddress));
if(ccAddress !=null && ccAddress.length()>0)
message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));
if(subject!=null && subject.length()>0)
message.setSubject(subject);
message.setFrom(new InternetAddress("[email protected]"));
if((messageBody!=null) && (messageBody.length()>0))
message.setContent(messageBody,"text/plain");
}else
message.setContent("","text/plain");
Transport.send(message);
catch(Exception e)
e.printStackTrace();
Please mail to : [email protected]
Thanks and regards
kalyanHi Venkat,
The code seems ok to me. you don't need to configure WAS to use JavaMail APIs. However, if this code doesnot work then check with the code given below as this is working fine.
Properties prop = new Properties();
prop.put("mail.smtp.host", host);
prop.put("mail.smtp.auth", "false");
Session session = Session.getInstance(prop, null);
session.setDebug(true);
try {
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
InternetAddress[] address =
{ new InternetAddress(to1)};
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject(subject);
msg.setSentDate(new Date());
MimeBodyPart msg1Body = new MimeBodyPart();
msg1Body.setText(msg1);
MimeBodyPart msg2Body = new MimeBodyPart();
msg2Body.setText(msg2);
Multipart mp = new MimeMultipart();
mp.addBodyPart(msg1Body);
mp.addBodyPart(msg2Body);
msg.setContent(mp);
Transport.send(msg);
} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.print("AddressException : " + e.getMessage());
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.print("MessagingException : " + e.getMessage());
} catch (Exception e) {
System.out.print("Exception : " + e.getMessage());
where host is 12.38.145.108 in your case. May be you chk if your mail server is using another port. 25 is the default port for the smtp. This may be the case that your code is not working.
Regards:
Abhinav Sharma
PS : Do reward points if it helps -
Can we get Arraylist from String.Please check the code
Hi all,
I have just pasted my code over here.Can anyone of you find the solution for obtaining the Array list from the String.
For Example :
ArrayList al = new ArrayList();
al.add(new byte[2]);
al.add("2");
String stringVar = "" + (ArrayList) al;
Here I can convert the arraylist into string.But can we do he vice versa like obtaining the above arraylist from the string?If please advice me.
URGENT!!!!cudIf you run the code you posted you will observe that the string form of the list does not contain all the information of the list: in particular the array elements are missing. It follows that the "vice versa" conversion you seek is simply not possible.
A variation on this theme is the following:import java.util.ArrayList;
public class ListEg {
public static void main(String[] args) {
ArrayList al = new ArrayList();
al.add("foo");
al.add("bar, baz");
String stringVar = "" + (ArrayList) al;
System.out.println(stringVar);
}If you think about the output you should be able to conclude that lists with different contents can easily have the same string form.
Just something to chew on. -
Hi There,
Could you please have a look at the code below and suggest whether I am using If else in good manner or not?
User will enter Start date and end date at begbalance level and account value is also calculated at begbalance then we need to copy that value to months starting from the Start date month so I need to convert the integer value of month to string month.but it is giving error.
var monthsdiff,endyear,startyear,startmonth,endmonth;
fix("budget","begbalance",..........)
Fix("hsp_inputvalue")
"Account1"
startmonth=@INT(@MOD("Date-start",10000)/100);
Monthsidff=..........;
if(startmonth=1)
&startmon= "JAN";
elseif(startmonth=2)
&startmon= "FEB";
elseif(startmonth=3)
&startmon= "MAR";.........till dec
endif
if(endmonth=1)
&endmon= "JAN";
elseif(endmonth=2)
&endmon= "FEB";
elseif(endmonth=3)
&endmon= "MAR"...till dec
endif
fix(&startmon)
if(startyear==&CurrYear and endyear==&CurrYear)
"Account1"=("Account1"/12) *monthsdiff;
endfix
else
"Account1"->"may"=("Account1"/12) * monthsdiff;
endfix
endif
endfix
endfix
here Curryear is 2011.
Thanks
Edited by: user10760185 on Sep 20, 2011 2:19 AMIt looks like you are trying to assign a value to a substitution variable in your calc, you can't do that. ^^^Until quite recently, yes, but now if you read Robb Salzmann's blog and grab his CDF: http://codingwithhyperion.blogspot.com/2011/08/create-and-update-substitution.html
Btw, beyond Robb's code being a cool hack, I'm not entirely sure I'd want to change sub var values on the fly but it at least appears to be possible.
Regards,
Cameron Lackpour -
How to subtotal in alv? Please correct the code!!!!
hi,
I have an alv layout like following:
ZZZ 300100089 1050
ZZZ 300100089 1050
subtoal 2100
90256243 300100000 193410
90256242 300100000 173250
90256241 300100000 173250
90256240 300100000 173250
90256239 300100000 173250
90256238 300100000 173250
90256237 300100000 173250
subtotal 1232910
when the second numbers are the same,
I need to sum up as
300100089 2100
300100000 1232910
I write the coding as the following, but it did not work. I go dump in function module. Please
help and correct it!!
DATA I_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA WA_SORT TYPE slis_sortinfo_alv.
WA_SORT-fieldname = 'H_BETRG'. " speicfy field name..
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO I_SORT.
CLEAR WA_SORT.
IN FM.
it_sort = i_sort
I do not know what is the file name I should put into the WA_SORT-fieldname, I tried "wrbtr" and some other name, but I got the same dump when I excute the program. Please help me to correct the code.
Thank you.Hi,
The dump is as following:
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Error analysis
Short text of error message:
Technical information about the message:
Message classe...... "0K"
Number.............. 000
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Variable 3.......... " "
Variable 4.......... " "
Trigger Location of Runtime Error
Program SAPLSLVC
Include LSLVCU10
Row 36
Module type (FUNCTION)
Module Name LVC_SORT_COMPLETE
31 LOOP AT CT_SORT INTO LS_SORT.
32
33 READ TABLE IT_FIELDCAT ASSIGNING <LS_FIELDCAT>
34 WITH KEY FIELDNAME = LS_SORT-FIELDNAME BINARY SEARCH.
35 IF SY-SUBRC NE 0.
>>>> MESSAGE X000(0K).
37 ENDIF.
38
39 LS_SORT-SELTEXT = <LS_FIELDCAT>-SELTEXT.
40
41 * Zwischensummenstufen ermitteln
42 IF NOT LS_SORT-SUBTOT IS INITIAL.
43 L_COUNT = L_COUNT + 1.
Please help, thank you!! -
class Horseradish
//insert code here
protected HorseRadish(int x)
System.out.println("bok choy");
class Washabi extends HorseRadish{
public static void main(String[] args)
Wasabi w=new Wasabi();
which two,inserted independently at line 2,will allow the code to compile and produce the output "bok choy"?(choose two)
1. //just a comment
2. protected HorseRadish(){}
3.protected HorseRadish()
{this(42);}
4.protected HorseRadish() { new horseRadish(42);}
which two are the right options and why??
please answerbecause we want people to think for themselves rather
than spoonfeed them everything.
When you start spoonfeeding them, they'll never learn
to think on their feet and will forever come here
with every tiniest problem.Original:
public class Spoon {
public static Answer feed(Person me) {
/* Implementation */
}New:
protected class Spoon {
private static Answer feed(Person me) {
/* Implementation */
}Problem solved. -
Please check the code why it is not working
I am a new java servlets and jsp learner. I am running below example of session in Tomcat and "AccessCount" supposed to be increased by one value whenever servelet is refereshed. But I am always getting 0 value even after refereshing it.
I will appreciate your help.
=======================================================
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.net.*;
import java.util.*;
/** Simple example of session tracking. See the shopping
* cart example for a more detailed one.
public class ShowSession extends HttpServlet {
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String title = "Session Tracking Example";
String heading;
HttpSession session = request.getSession(true);
// Use getAttribute instead of getValue in version 2.2.
Integer accessCount = (Integer)session.getAttribute("accessCount");
if (accessCount == null) {
accessCount = new Integer(0);
heading = "Welcome, Newcomer";
} else {
heading = "Welcome Back";
accessCount = new Integer(accessCount.intValue() + 1);
// Use setAttribute instead of putValue in version 2.2.
session.setAttribute("accessCount", accessCount);
out.println("<html><h1>" + title + "</h1>" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<H1 ALIGN=\"CENTER\">" + heading + "</H1>\n" +
"<H2>Information on Your Session:</H2>\n" +
"<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
"<TR BGCOLOR=\"#FFAD00\">\n" +
" <TH>Info Type<TH>Value\n" +
"<TR>\n" +
" <TD>ID\n" +
" <TD>" + session.getId() + "\n" +
"<TR>\n" +
" <TD>Creation Time\n" +
" <TD>" +
new Date(session.getCreationTime()) + "\n" +
"<TR>\n" +
" <TD>Time of Last Access\n" +
" <TD>" +
new Date(session.getLastAccessedTime()) + "\n" +
"<TR>\n" +
" <TD>Number of Previous Accesses\n" +
" <TD>" + accessCount + "\n" +
"</TABLE>\n" +
"</BODY></HTML>");
/** Handle GET and POST requests identically. */
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
========================================================Change the code
HttpSession session =
request.getSession(true);AS
HttpSession session =
request.getSession(false);If you pass "false", then the Session is not created.
If you pass "true" the session is always created
new.
Thanks and regards,
Pazhanikanthan. PI dont think that's correct -
1. request.getSession(false) returns a Session object if one exists.
2. request.getSession(true) creates a new Session object if it doesnt exist or returns the reference to the existing object if the request is part of an valid session.
OP, check with default session-timeout values in web.xml
Ram. -
Plz chk the code wats wrong in it
hi
i m having itab with vbeln
and ztable with objnr and ordsent.
where objnr and vbeln are equal
so now when i find objnr EQ vbeln i have to modify the ztable-ordsent = ' '.
i have writen the followin code
LOOP AT lt_ztsd2marc INTO ls_ztsd2marc.
READ TABLE ct_success INTO ls_success WITH KEY ordnr =
ls_ztsd2marc-ordnr.
IF sy-subrc EQ 0.
ls_ztsd2marc-ordsent = ' '.
MODIFY TABLE lt_ztsd2marc FROM ls_ztsd2marc TRANSPORTING ordsent .
MODIFY ztsd2marc FROM TABLE lt_ztsd2marc.
IF sy-subrc EQ 0.
MESSAGE s112(z2).
ENDIF.
ENDIF.
ENDLOOP.
its updating it in work area but the changes are not gettin reflected in the internal table and not even in my ztable ztsd2marc.
plz tell me wat is wrong in this code?hi..
jus try the code below.. it'll def give the solution to ur question.
i've jus modified little of ur code that u posted.
LOOP AT lt_ztsd2marc INTO ls_ztsd2marc.
READ TABLE ct_success INTO ls_success WITH KEY ordnr =
ls_ztsd2marc-ordnr.
IF sy-subrc EQ 0.
ls_ztsd2marc-ordsent = ' '.
MODIFY TABLE lt_ztsd2marc FROM ls_ztsd2marc TRANSPORTING ordsent
where ordnr = ls_ztsd2marc-ordnr .
**MODIFY ztsd2marc FROM TABLE lt_ztsd2marc.
update ztsd2marc set ordsent = it_ztsd2marc-orsent
where ordnr = it_ztsd2marc-ordnr.
IF sy-subrc EQ 0.
MESSAGE s112(z2).
ENDIF.
ENDIF.
ENDLOOP.
all the best -
What will be the output of the following code? Can I get some detail explanation?
class A{
void show(){
System.out.println("A");
interface my{
public void show();
class B extends A{
B(my m){
m.show();
public void show(){
System.out.println("B");
public class test implements my{
public void show(){
System.out.println("test");
public static void main(String args[]){
test t=new test();
B b=new B(t);
b.show();
}ThanksWhat will be the output of the following code? Can I
get some detail explanation?Well, I guess you were not able to figure out HOW you got that output. Should have been a li'l more clear in your question. Never mind now... here is my understanding of the code.
1) The program starts at main()
2) creates an object for test called t (does nothing more than this since it does not have a constructor defined by you!!)
3)creates an object for B whose constructor takes an object argument of type my. you send t becuase test implements my.
4)calls the show method of m in the constructor.
5)now, where is the definition of show() for m? Its in test. So now, that show() is executed and hence "test" is printed first.
6)all done, it comes back to the main() to go to the next statement.
7)calls the show() of b.
8)this version of show asks to print "B" and hence the output.
Was this detailed explanation enough? I hope so... ;-) -
Help with Swipe+zoom. Please review the code.
Hello there,
I am trying to get the a page swipe and zoom work for a project for iPhone and iPad. I am not an expert in AS3 but have been able to put togather a piece of code with the helpful folks from this forum. My swipe works like a charm, but when I try to incorporate the code for zoom, the zoom/pinch part doesn't work. I know for people who know AS3 it might be a simple mistake on my part.
Following is the code I have been playing with. Thanks for your suggestions in advance.
regards,
Umesh
stop();
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.TransformGestureEvent;
Multitouch.inputMode = MultitouchInputMode.GESTURE;
var yourswipeobject:MovieClip;
var swipeRange:uint = 100;
yourswipeobject.initX = yourswipeobject.x;
yourswipeobject.addEventListener(MouseEvent.MOUSE_DOWN,startDragF);
yourswipeobject.addEventListener(MouseEvent.MOUSE_UP,stopDragF);
yourswipeobject.addEventListener(TransformGestureEvent.GESTURE_ZOOM,onZoom);
function onZoom (e:TransformGestureEvent):void{
yourswipeobject.scaleX *= e.scaleX;
yourswipeobject.scaleY = yourswipeobject.scaleX;
function startDragF(e:Event):void{yourswipeobject.startDrag(false, new Rectangle(yourswipeobject.initX-swipeRange,yourswipeobject.y,swipeRange*2,0));
function stopDragF(e:Event):void{
yourswipeobject.stopDrag();
if(yourswipeobject.x<yourswipeobject.initX-swipeRange/2){
if (currentFrame == totalFrames) {
gotoAndStop(1);
} else {
nextFrame();
} else if(yourswipeobject.x>yourswipeobject.initX+swipeRange/2){
if (currentFrame == 1) {
gotoAndStop(totalFrames);
} else {
prevFrame();
yourswipeobject.x = yourswipeobject.initX;Hello there,
I am trying to get the a page swipe and zoom work for a project for iPhone and iPad. I am not an expert in AS3 but have been able to put togather a piece of code with the helpful folks from this forum. My swipe works like a charm, but when I try to incorporate the code for zoom, the zoom/pinch part doesn't work. I know for people who know AS3 it might be a simple mistake on my part.
Following is the code I have been playing with. Thanks for your suggestions in advance.
regards,
Umesh
stop();
import flash.events.MouseEvent;
import flash.events.Event;
import flash.events.TransformGestureEvent;
Multitouch.inputMode = MultitouchInputMode.GESTURE;
var yourswipeobject:MovieClip;
var swipeRange:uint = 100;
yourswipeobject.initX = yourswipeobject.x;
yourswipeobject.addEventListener(MouseEvent.MOUSE_DOWN,startDragF);
yourswipeobject.addEventListener(MouseEvent.MOUSE_UP,stopDragF);
yourswipeobject.addEventListener(TransformGestureEvent.GESTURE_ZOOM,onZoom);
function onZoom (e:TransformGestureEvent):void{
yourswipeobject.scaleX *= e.scaleX;
yourswipeobject.scaleY = yourswipeobject.scaleX;
function startDragF(e:Event):void{yourswipeobject.startDrag(false, new Rectangle(yourswipeobject.initX-swipeRange,yourswipeobject.y,swipeRange*2,0));
function stopDragF(e:Event):void{
yourswipeobject.stopDrag();
if(yourswipeobject.x<yourswipeobject.initX-swipeRange/2){
if (currentFrame == totalFrames) {
gotoAndStop(1);
} else {
nextFrame();
} else if(yourswipeobject.x>yourswipeobject.initX+swipeRange/2){
if (currentFrame == 1) {
gotoAndStop(totalFrames);
} else {
prevFrame();
yourswipeobject.x = yourswipeobject.initX; -
DATA :Begin of itab_reqid occurs 0,
objid like hrp1001-objid,
end of itab_reqid,
Begin of itab_postid occurs 0,
postid like hrp1001-objid,
end of itab_postid.
Select distinct objid from hrp5125 into table itab_reqid
where aedtm BETWEEN '20060107' and '20073108'.
Select OBJID from hrp1001 into table itab_postid where objid IN itab_reqid
AND SCLAS = 'NC'.
The above code gives an error called "line type for itab_reqid is incorrect".
Please advise,
ThanksHi Reena,
I am not sure if your approach works for ranges. I think the problem in your code is that itab_reqid is not a range and yet you have used it like a range in your SQL SELECT where clause.
You could try this approach instead:
DATA :Begin of itab_reqid occurs 0,
objid like hrp1001-objid,
end of itab_reqid,
Begin of itab_postid occurs 0,
postid like hrp1001-objid,
end of itab_postid.
RANGES: r_reqid for hrp1001-objid.
Select distinct objid from hrp5125 into table itab_reqid
where aedtm BETWEEN '20060107' and '20073108'.
if not itab_reqid[] is initial.
r_reqid-option = 'EQ'.
r_reqid-sign = 'I'.
LOOP AT itab_reqid.
r_reqid-low = itab_reqid-objid.
append r_reqid.
ENDLOOP.
Select OBJID from hrp1001 into table itab_postid where objid IN itab_reqid
AND SCLAS = 'NC'.
endif.
Kind Regards,
Darwin -
Please solve the code inpsector error: Sequential read access possible
Hi,
i am getting code inspector warning message . could u please try to provide the solution for that warning message.
code inspector warning message is : Sequential read access possible for a hashed table
My statment : read table <lt_product_mbr> with table key (ujr0_c_member_id) = <l_product> assigning <ls_product_mbr>.
i declared <LT_PRODUCT_MBR> TYPE ANY TABLE.
Eventough i delared it as a type hashed or sorted . it is giving same warning message.
Regards
KotiHi Koti,
you specified the key field dynamically (variable in brackets). That means
it can not be checked statically whether the table key of the hashed table
is used or not since this is only clear at run time.
If you use the dynamic key specification
read table <lt_product_mbr> with table key (ujr0_c_member_id) = <l_product> assigning <ls_product_mbr>.
and not the direct key:
read table <lt_product_mbr> with table key field = <l_product> assigning <ls_product_mbr>.
the CI will warn you that you may end up with a sequential red (if not the table key of the hashed table
is used in the variable at run time.
Kind regards,
Hermann -
hi
can any one execute the following code n tell me y its not workin...
actually the file is getting downloaded and it opens by excel but not with the pdf.
REPORT z_output_pdf.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA:wa_ekpo TYPE t_ekpo,
p_repid LIKE sy-repid,
it_ekpo TYPE STANDARD TABLE OF t_ekpo.
DATA : lv_repid TYPE sy-repid,
lv_uname TYPE sy-uname.
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i.
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
lv_repid = sy-repid.
lv_uname = sy-uname.
SELECT ebeln matnr
FROM ekpo
INTO TABLE it_ekpo.
LOOP AT it_ekpo INTO wa_ekpo.
WRITE :/ wa_ekpo-ebeln, wa_ekpo-matnr.
ENDLOOP.
DATA: print_parameters TYPE pri_params,
valid_flag(1) TYPE c,
mi_rqident LIKE tsp01-rqident.
DATA: p_linsz TYPE sy-linsz VALUE 132, " Line size
p_paart TYPE sy-paart VALUE 'X_65_132'. " Paper Format
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING
out_parameters = print_parameters
valid = valid_flag
EXCEPTIONS
invalid_print_params = 2
OTHERS = 4.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
print_parameters-linsz = p_linsz.
print_parameters-paart = p_paart.
print_parameters-pdest = 'LOCL'.
*SUBMIT (lv_repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS print_parameters
VIA SELECTION-SCREEN
AND RETURN.
*IF sy-subrc <> 0.
WRITE :' error'.
*ENDIF.
*-- Find out what the spool number is that was just created
PERFORM get_spool_number USING lv_repid
lv_uname
CHANGING mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = print_parameters-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
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.
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = it_ekpo.
write :' ============'.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
FORM get_spool_number USING f_repid
f_uname
CHANGING f_rqident.
DATA:
lc_rq2name LIKE tsp01-rq2name.
CONCATENATE f_repid+0(8)
f_uname+0(3)
INTO lc_rq2name SEPARATED BY '_'.
DATA : ls_tsp01 TYPE tsp01,
lt_tsp01 TYPE TABLE OF tsp01.
SELECT * FROM tsp01
INTO TABLE lt_tsp01
WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
LOOP AT lt_tsp01 INTO ls_tsp01.
f_rqident = ls_tsp01-rqident.
EXIT.
ENDLOOP.
SELECT * FROM tsp01 WHERE rq2name = lc_rq2name
ORDER BY rqcretime DESCENDING.
f_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR f_rqident.
ENDIF.
ENDFORM." get_spool_number
plz chk n tell me where its goin wrong....
Message was edited by:
neha guptaHi neha,
i do it in this way:
REPORT ZGRO_ITAB_PDF_SPOOL.
DATA: BEGIN OF ITAB OCCURS 0,
TEXT(72),
END OF ITAB.
Länge der PDF-Datei in Byte
DATA: PDF_FILESIZE TYPE I.
DATA: BIN_FILESIZE TYPE I.
Druckparameter mit Gültigkeit
DATA: PARAMS LIKE PRI_PARAMS,
VALID TYPE C.
Spoolnummer
DATA: SPOOL_NR LIKE TSP01-RQIDENT,
SPOOL_NR_DEL LIKE TSP01_SP0R-RQID_CHAR.
PDF Ausgabetabelle
DATA: BEGIN OF PDF_OUTPUT OCCURS 0.
INCLUDE STRUCTURE TLINE.
DATA: END OF PDF_OUTPUT.
DATA: PROGRAM(128) TYPE C.
DATA: DATEI TYPE STRING VALUE 'D:TESTPDF.PDF'.
DATA: APPL TYPE STRING.
START-OF-SELECTION.
Druckparameter besorgen (hier für LOCA)
Line-size sollte entsprechende der Ausgabe gesetzt werden
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
DESTINATION = 'LOCA'
LINE_SIZE = 080
IMMEDIATELY = ' '
NO_DIALOG = 'X'
IMPORTING
OUT_PARAMETERS = PARAMS
VALID = VALID.
CHECK VALID <> SPACE.
Versorgen der internen Tabelle
READ REPORT 'ZGRO_ITAB_PDF_SPOOL' INTO ITAB.
Ausgabe der internen Tabelle mit den Druckparametern.
NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG NO-TITLE NO-HEADING.
LOOP AT ITAB.
WRITE:/ ITAB.
ENDLOOP.
NEW-PAGE PRINT OFF.
Spoolnummer besorgen
SPOOL_NR = SY-SPONO.
Konvertierung der Ausgabe nach PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = SPOOL_NR
IMPORTING
PDF_BYTECOUNT = PDF_FILESIZE
TABLES
PDF = PDF_OUTPUT
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.
CHECK SY-SUBRC = 0.
SPOOL_NR_DEL = SPOOL_NR.
Spool wieder löschen
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
SPOOLID = SPOOL_NR_DEL.
BIN_FILESIZE = PDF_FILESIZE.
Download der Spools
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
FILENAME = DATEI
FILETYPE = 'BIN'
CHANGING
DATA_TAB = PDF_OUTPUT[].
Programmpfad auf PC für PDF ermitteln
CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
EXPORTING
DOCTYPE = 'PDF'
IMPORTING
PATHNAME = PROGRAM
EXCEPTIONS
PATH_NOT_FOUND = 1
PROGRAM_NOT_FOUND = 2
NO_BATCH = 3
X_ERROR = 4
OTHERS = 5.
PDF ausführen
APPL = PROGRAM.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
EXPORTING
PARAMETER = DATEI
APPLICATION = APPL.
Programmende *
Regards, Dieter
Maybe you are looking for
-
As of Tuesday, unable to connect to the internet using linksys BEFW11S4 wireless router. Status showing limited or no connectivity. Any suggestions?
-
how can we arrange high sea purchase transantion in sap
-
MS Word, Appleworks - Cyrilic fonts in fonts list
I have been using Font Book to minimize the length of the fonts list in word processors. It has been effective but the font pulldown menus still include a choice of CY and CE appended to essential fonts (Courier CE,CY for instance). If selected they
-
WORK FLOW & PROCEDURE FOR FOR SNP CAPACITY LEVELLING HEURISTICS RUN
Dear Sir / Madam, Currently, we are taking only SNP Heuristics Run and the output viz. planned stock transfer requisitions are being passed to PPDS as such. But now we feel, SNP capacity leveling can play a vital role in getting more fine tuned re
-
User Exit to capture Archivelink usage
In our 4.7 R/3 environment, we implemented a user exit to capture when a user displays a document. It captures the user, document viewed, etc and writes the updates an entry on a z table. The user exit is in the Exit_SAPLOPTM_001 function. The use