Subramanian
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ListIterator;
import java.util.Vector;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
public class FileTRA {
String parentPath = "d:";
Vector v = new Vector();
Vector v1 = new Vector();
// String str = "e:\\hi";
String str = "\\\\srmpc031\\share";
File log = new File("d:\\log.txt");
StringBuffer sb = new StringBuffer();
Logger logg = Logger.getLogger(FileTRA.class.getName());
FileHandler fh = null;
public static void main(String[] args) {
FileTRA fm = new FileTRA();
fm.fileDisplay(fm.str, 1);
try {
fm.fh = new FileHandler("c:\\log.txt", true);
fm.logg.addHandler(fm.fh);
fm.logg.log(Level.SEVERE,""+fm.v);
// fm.logg.log(Level.SEVERE,"dsfdsfs");
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
InputStream ins = null;
OutputStream ino = null;
Vector check = new Vector();
public void fileDisplay(String dir, int key) {
File folder = new File(dir);
if (folder.exists() && folder.isDirectory()) {
parentPath = parentPath + "/" + folder.getName();
File allfiles[] = folder.listFiles();
if (allfiles.length > 0) { // create duplicate dir
File createDir = new File(parentPath);
boolean flag = false;
check = RecursionMethodCompress1(allfiles, parentPath);
flag = createDir.mkdir();
RecursionMethodCompress(allfiles, parentPath);
try {
ins.close();
ino.close();
} catch (IOException e) {
e.printStackTrace();
boolean flag1 = false;
String temp = null;
int size ;
int count = 0;
public void RecursionMethodCompress(File allfiles[], String parentPath) {
for (File in : allfiles) {
if (in.isDirectory()) { // create sub directory
String output = in.getPath().substring(str.length(),
in.getPath().length());
output = parentPath + output;
File out = new File(output);
out.mkdir();
String [] fileArray ;
fileArray = in.list();
System.out.println(fileArray.length);
size = fileArray.length;
RecursionMethodCompress(in.listFiles(), parentPath);
} else if (in.isFile()) {
String output = in.getPath().substring(str.length(),
in.getPath().length());
output = parentPath + output;
ListIterator li = check.listIterator();
int county = 0;
while(li.hasNext())
temp = ""+li.next();
System.out.println(temp);
if(temp.equals(output))
System.out.println("equal");
// v.add(output);
flag1 = true;
// break GOTO1;
else
flag1 = false;
count++;
if(count == size)
v.add("new---FILE");
v.add(output);
v.add("\n");
try {
File out = new File(output);
out.createNewFile();
String s = in.getPath();
ins = new FileInputStream(s);
ino = new FileOutputStream(output);
byte[] by = new byte[1024 * 1024];
int len;
while ((len = ins.read(by)) > 0) {
ino.write(by, 0, len);
} catch (IOException ex) {
ex.printStackTrace();
public Vector RecursionMethodCompress1(File allfiles[], String parentPath) {
for (File in : allfiles) {
if (in.isDirectory()) { // create sub directory
String output = in.getPath().substring(str.length(),
in.getPath().length());
output = parentPath + output;
File out = new File(output);
RecursionMethodCompress1(in.listFiles(), parentPath);
} else if (in.isFile()) {
String output = in.getPath().substring(str.length(),
in.getPath().length());
output = parentPath + output;
v1.add(output);
return v1;
}
They're going to have fun with the likes of
File log = new File("d:\\ log.txt");
Similar Messages
-
Error while creating a process chain
Hello BI Gurus,
I have activated the Business Content Scenario in Plant Maintenance for Infocube 0PM_C08(Measurement Results).
It provides a datasource -> infocube flow,through DSO with transfer and update rules.(3.X scenario)
I have two questions -
1.When I am trying to create a process chain for this scenario for regular delta loads(Loading from the datasource - > DSO - > infocube),
Start - >Execute InfoPackage->Activate DSO Data ->
Then when i insert the Execute Infopackage for the load step from DSO to Infocube in the process chain and check it, it is giving an error saying "InfoPackage ZPAK_D50AJ26831X6L4IIOTZTSXWAE is generated; NOT able to be used as loading variant ".
I got this infopackage by right clicking on the context menu and going to Additional Functions -> Update 3.x data to Data targets.
Why am I getting this error and how to resolve it, bcos when i load it manually it is working fine?
2.If the error is because I did not use a infopack created by me, then how to create a infopack for loading to the infocube from DSO in BI7, because when i select from the Context Menu for creating infopack, it is taking me to the already generated IP ?
Also instead of using the 3.X mechanisms, if I decide to create a DTP, will the transformation created with it automatically map all the rules in the "Update Rules" for all fields?
Waiting for your guidance.
With Warm Regards,
Vineeth
Edited by: VINEETH SUBRAMANIAN.B on Jan 31, 2009 12:11 PMHi,
Check in SDN
Problem with process chain
Re: Updating Data from ODS to IC using Process chains
Indirect Spend Analysis
Thanks
Reddy -
How to find out list of variants in TVARV table
hi!
can anybody can guide me on the following issues? plz
How to list all variants in TVARV table?
How to find out any Z* programs that writes to TVARV table, using the variant name?
How to find out the programs which are reads the TVARV data into a program variant?
Thanks & Regards,
vijayOr some help might be useful:
http://help.sap.com/saphelp_47x200/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/frameset.htm
Regards,
Subramanian V. -
How do I populate an abstractlist that is an input to an RFC? I read the post by Bertram Ganz, but my generated classes look different. I imported the RFC and the system generated the following:
-zbapi_appraisal_create
-zbapi_appraisal_create_input
-appraisees (bapiappraisee)
-bapiappraisee
-fields...
-output (zbapi_appraisal_create_output)
-same as output node below
-appraiser_id
-rest of input parameters...
-zbapi_appraisal_create_output
...etc.
I have no problem setting the regular input parms, but how do I set the table? I tried the following, but I get a ClassCastException on the call to setAppraisees().
Zbapi_Appraisal_Create_Input input = new Zbapi_Appraisal_Create_Input();
wdContext.nodeZbapi_Appraisal_Create().bind(input);
input.setAppraisal_Model_Id(appraisalModelId);
input.setStart_Date(startDate);
input.setText(description);
input.setCreation_Date(appraisalDate);
input.setAppraiser_Id(appraiserId);
//static values
input.setPlan_Version("01");
input.setAnonymous(true);
input.setAppraiser_Type("P");
input.setAppraiser_Plan_Version("01");
//create appraisee
<b>Bapiappraisee obj = new Bapiappraisee();
obj.setPlan_Version("01");
obj.setType("P");
obj.setId(appraiseeId);
obj.setName(appraiseeName);
List myList = input.getAppraisees();
if (myList == null) myList = new ArrayList();
myList.add(obj);
input.setAppraisees((AbstractList)myList);</b>
wdContext.currentZbapi_Appraisal_CreateElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
Any input is greatly appreciated!!
John<b></b>Please read a good manual prepared by Arun Bhat -
<a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f3f93ee7-0c01-0010-2593-d7c28b5377c2">Adaptive RFC Troubleshooting Guide</a>
WDDynamicRFCException most likely comes in the following cases:
a) JCo is not setup properly
b) Your function module does not exist in R/3 system referred by your JCo
c) Your function module is not RFC enabled
d) DD_DOMA_GET is not RFC enabled
Also make sure you have got your cardinality settings for your model node in context controller proper.
If you have used a template approach, just check your wdDoInit method of your custom/component controller for code similar to the following:
wdContext.nodeBAPI_Input().bind(new BAPI_Input());
If you have the above code and the code that you have just pasted , just comment this code and try executing your application again.
Regards,
Subramanian V.
Message was edited by: Subramanian Venkateswaran -
hi all
i had tried so many times to change the selection screen of logical database but i was not able to do this whenever i change the screen that change is disappeard on runtime can anyone help me on how to change the selection screen of logical databse.
sunandaYou can define a selection view from the ABAP
Workbench by choosing Extras ® Selection views to open the
Logical Database Builder, or by choosing Further objects
from the initial screen of the Repository Browser. They
are identified using a three-character key describing the
origin of the selection view. Predefined selection views
have the key SAP, customer-defined ones have the key CUS.
This way, users can define the best logical database
selection views for their requirements.
If you want to use a selection view in a logical database,
it must be called STANDARD, and must be assigned to a
logical database. Selection views that are not assigned to
a particular logical database may have any name, and they
can be used freely.
For more information ,refer this help:
http://help.sap.com/saphelp_47x200/helpdata/en/f7/3ecfa4149c11d2953c0000e8353423/frameset.htm
Additionally you may also want to view this part of the help:
http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9c2e35c111d1829f0000e829fbfe/frameset.htm
Regards,
Subramanian V.
Message was edited by: Subramanian Venkateswaran -
hi all..
can any one provide me with the links od the site tat provide me with the abap tips on performance tuning in abap,reports, ALV smart forms,IDOC, DDIC objects .. and entire abap..
thnxHi,
Go through these link...
this is the book on ABAP..
It covers all the basic topics in ABAP..
http://cma.zdnet.com/book/abap/index.htm
check these links also...
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
for keywords
very useful link for all
http://www.sapgenie.com/abap/index.htm
http://www.sap-img.com/abap.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
http://www.thespot4sap.com/
http://www.kabai.com/abaps/q.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapgenie.com/abap/tips_and_tricks.htm
http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
For FAQ
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.sapgenie.com/faq/abap.htm
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
Weblog for receive email and processing it through ABAP
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
For Logical database
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
very useful
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Useful link to websites
http://www.hernangn.com.ar/sap.htm
Useful for background
http://www.sappoint.com/basis/bckprsng.pdf
http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
For posting weblog,
/people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
Dynamic Internal table -weblog in sdn
/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
Smartforms
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
ALV
http://www.geocities.com/mpioud/Abap_programs.html
Mail
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Sending mail in background or spool mail
http://www.sap-basis-abap.com/sapac018.htm
BOM Explosion
/people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
BOM
http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
http://www.sap-basis-abap.com/sappp007.htm
OLE
http://www.sapgenie.com/abap/ole.htm
http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
ALVGRID with refresh
http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
For language setting and decimal separator
/people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
Oracle queries
http://sqlzoo.net/
To format SQL
http://www.sqlinform.com/
SCOT settings
http://www.sap-img.com/basis/basis-faq.htm
Status Icon [ALV,Table Control,Tab Strip]
http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
ALV Group Heading
http://www.sap-img.com/fu037.htm
For multiMedia
/people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
Uploading LOGO in SAP
http://www.sap-img.com/ts001.htm
LSMW
http://www.sap-img.com/sap-data-migration.htm
http://www.sapgenie.com/saptech/lsmw.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
OOPS ALV
OOPS - Events.
Editable ALV
Tree
TabStrip
Multigrid
Check this for basic concepts of OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
Tabstrip
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
Editable ALV
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
Tree
http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
General Tutorial for OOPS
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
Function Module
http://www.geocities.com/victorav15/sapr3/abapfun.html
Smartforms
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
Table Control
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table%20control%20in%20abap.pdf
Regards,
Prasant
*reward if helpful -
Hi,
Currently using SAP 4.7 SAPKB62011
The need was to develop a program, which based on a selection-criteria displays a table(editable) and some changes will be done in the table and data should get saved.
The best approach I assumed was to
a) Create a report, define the selection screen parameters
b) Do validation in at selection-screen
c) If all validations are proper, select values to be shown in table control
d) call screen 9000
Everything is working perfectly, except for adding new lines in table control.
When I execute select query in AT SELECTION-SCREEN event before calling the screen 9000, then I am not able to add values to table control.
But if I put the select query in the PBO of screen 9000, I am able to add new values. Only those values which are already present in table control can be changed. I am not able to add any new entries.
In my opinion, there should not be a select query in PBO, because that query would hit the database in all possible events.
Any particular reason, why.
<b>AT SELECTION-SCREEN code</b>
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'ONLI'.
lv_pernr = p_pernr.
lv_lifnr = p_lifnr.
* SELECT *
* FROM zpersoninfo
* INTO TABLE lt_zpersoninfo
* WHERE personno = lv_pernr.
* IF sy-subrc <> 0.
* ENDIF.
* APPEND INITIAL LINE TO LT_ZPERSONINFO.
CALL SCREEN 9000.
ENDCASE.
<b>Dynpro code</b>
PROCESS BEFORE OUTPUT.
MODULE pbo_9000.
LOOP AT lt_zpersoninfo INTO zpersoninfo WITH CONTROL tablecontrol CURSOR
tablecontrol-current_line.
MODULE pbo_tc_9000.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP.
MODULE pai_tc_9000.
ENDLOOP.
MODULE pai_9000.
<b>PBO_9000</b>
MODULE pbo_9000 OUTPUT.
SET PF-STATUS lv_pfstatus.
pa0315-pernr = lv_pernr.
SELECT *
FROM zpersoninfo
INTO TABLE lt_zpersoninfo
WHERE personno = lv_pernr.
IF sy-subrc <> 0.
ENDIF.
APPEND INITIAL LINE TO LT_ZPERSONINFO.
ENDMODULE. " PBO_9000 OUTPUT
<b>PBO 9000 - Table Control Code</b>
MODULE pbo_tc_9000 OUTPUT.
LOOP AT SCREEN.
IF lv_pfstatus = 'DISPLAY'.
CASE screen-name.
WHEN 'ZPERSONINFO-SERVICENO'.
screen-input = '1'.
screen-active = '1'.
WHEN 'ZPERSONINFO-MANDATORY'.
screen-input = '1'.
screen-active = '1'.
ENDCASE.
ELSEIF lv_pfstatus = 'CHANGE'.
CASE screen-name.
WHEN 'ZPERSONINFO-SERVICENO'.
screen-input = '0'.
WHEN 'ZPERSONINFO-MANDATORY'.
screen-input = '0'.
ENDCASE.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.
Let me know if I have skipped some information, which you may find it useful to find the solution.
Regards,
Subramanian V.That is because I didn't upate the 'LINES' field in tablecontrol. How silly !!
Regards,
Subramanian V. -
Loop at itab in a Smarform problem
Hi Guys,
Right now i'm developing my first OO program that calls a Smartform, but I'm having the following issue.
I call a method exporting the internal table that i want to pass to the SF, but when i want to make a loop statement in the SF I get a dump. I asked some friends and they told me that right now is obsolete the table statement, so i declare in the SF in the importing tab and then declare it in the exporting part of the FM that calls the SF.
Now when i try to activate the SF i guet the following error: "You may only read from table "IT_GRID1". - reading.".
so my question is, how can i declare my itab in order to be able to add a loop statement?.
Regards,
EricHi Subramanian,
At first I did what you suggest, but for a reason that I can`t explain, when the loop begins I always get a dump. The only way that i could make the dump disappear was by replacing the name of the parameter that I receive from the method for the original table.
Example:
" I call the method in the main method.
lcl_reporte_auditoria=>llamar_sf( EXPORTING
table = it_sf ).
METHOD llamar_sf.
* Llamar al Formulario
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZQM_RPT_AUDITORIA_LLANTA_VERDE'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯*
* CONFIGURO LOS OPARAMETROS DE SALIDA PARA Q NO APAREZACA *
* LA CAJA DE DIALOGO DE LA IMPRESION *
wa_ssfctrlop-device = 'PRINTER'.
wa_ssfctrlop-langu = sy-langu.
wa_ssfctrlop-replangu1 = sy-langu.
wa_ssfctrlop-replangu2 = sy-langu.
wa_ssfctrlop-replangu3 = sy-langu.
wa_ssfctrlop-no_dialog = 'X'. "SIN DIALOGO
wa_ssfctrlop-preview = 'X'. "VISTA PREVIA
wa_ssfcompop-tddest = 'LOCL'. "LOCAL AL PC
wa_ssfcompop-tdimmed = 'X'. "IMPRESION IMEDIATA
CALL FUNCTION fm_name
EXPORTING
control_parameters = wa_ssfctrlop
output_options = wa_ssfcompop
user_settings = ''
TABLES
it_grid1 = table
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDMETHOD. "llamar_sf
In this case I get a dump as soon as the SF reach the loop statement. If I change the
TABLES
it_grid1 = table
for
TABLES
it_grid1 = it_sf
The dump doesn't appear anymore.
The dump says: MOVE_TO_LIT_NOTALLOWED_NODATA
Assignment error: Overwriting a protected field.
At that moment a friend told me that the table statement was obsolete in OO programing, and encourage me to change it for a exporting parameter. This is the reason why i'm doing it, please anyone tell me is that affirmation is correct. Otherwise, could someone explain me why i'm getting that error when i export the table that i'm receiving in the method call.
Regards,
Eric
Message was edited by:
Eric Hernandez Pardo -
Populate Batch characteristic values in create sales order BAPI
Can anybody help me in populating the batch characteristic values using BAPI_SALESORDER_CREATEFROMDAT2?
I have checked the related notes provided by SAP, like, 567348 but it will be great if someone can send some code snippet on this.Subramanian, Brad and Raja.
Thanks for your suggestions its were useful, with
these i can resolve my problem.
!!! Best Regards !!!
Raja
I used the se37 to test bapis, is more easy and fast !!
and you can save data like variant, and you can simulate the real execution without write any code abap,
and re-process the times that you need,
when you know what fields you need you write your abap code faster.
Thanks !!!
Message was edited by: Noemi Huerta -
hi experts,
i want to display all items of customer means open and closed items. but on which condition we will display.
reward points.Hi,
Try this link :
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
Thanks to Hafeez(for letting me know about this link).
Regards,
Subramanian V. -
Performance problem in ABAP code
hai guys,
I created report using tables like bsis,t001 etc,( tax report).
I have performance problem in this report.
COuld you pls tell me how to analyse the report and find out the place where process is taking more memory etc.
i did abap trace and runtime analysis..but could not find out exact point.
how to do this..
i want to analysis each subroutine,internal table and query process.
could you pls give me some ideas.
ambichanThere is an excellent tool available in SAP - <b>Code Inspector.
</b>
Transaction is SCII
Try the following link and I am sure you will find a bunch of useful documents.
<a href="http://www.google.co.in/search?hl=en&safe=off&q=site%3Asdn.sap.comfiletype%3ApdfCode+Inspector&btnG=Search&meta=">ABAP Performance</a>
I use the Code Inspector to search for
a) All the select statements which are present within the loop
b) Nested Loops
c) Select query without providing criteria for primary keys, depending upon situation
d) Can the search be narrowed with extra conditions
e) Using READ .. BINARY SEARCH if internal table has lots of records.
The list is actually endless, but this is something to start with.
You can actually have a checklist, and depending upon it, go through your code. The more you adhere to checklist, you will find that, the performance would dramatically improve.
Also use <b>ST05</b> transaction, for SQL Trace and find out which select query is taking the maximum time for response.
Regards,
Subramanian V. -
Missing Line Items and '?' Symbols in some Reports
I have upgraded the patch level of my production server and patch level
list is given below
SAP_BASIS 640 0022 SAPKB64022
SAP_ABA 640 0022 SAPKA64022
ST-PI 003C_640 0001 SAPKITLPS1
PI_BASIS 2006_1_6400006 SAPKIPYL06
SAP_BW 350 0021 SAPKW35021
SAP_HR 500 0017 SAPKE50017
SAP_APPL 500 0019 SAPKH50019
PI 2004_1_5000004 SAPKIPZI64
problem is that whenever I run SAP FICO standard reports FL3N, FBL5N,
KB01, F.08 etc it generates the report correctly but when i am taking
print out of these reports it misses some line items and total value as
well screen shots are attached for information.
my second problem is that there are some garbage entries with
symbol '?' in SAP Menu and toolbars of some Reports. Screen shot is
also attached for your information.
i am facing lots of problem in executing my daily operations due to
these errors.
regards,
Majid KhanDear Subramanian,
I am facing the same problem in Development and Quality Assurance Server
Regards,
Majid Khan -
How to trace production order history
Hi,
how to trace production order history, with all information like some addtion and deletion of components in production order.
I need the history like how we are doing ECM in master data history.
Regards,
S.Suresh.
Edited by: suresh subramanian on Jul 16, 2008 7:31 AMDear Suresh,
Please refer the link,[http://help.sap.com/saphelp_46c/helpdata/en/35/ce8d378d0302cae10000009b38f9b7/frameset.htm]
Regards,
R.Brahmankar -
Delivery date not updated in Schedule line
Hi friends,
We are trying to update the delivery date of a schedule line in a sale order item through BAPI_SALESDOCUMENT_CHANGE. This goes well for all the cases except when the last sale order item is fully delivered. When the last sale order item is fully delivered, the BAPI is unable to update the delivery date for any of the other schedule line items in the same sale order.
While debugging standard SAP program SAPMV45A, we found that the XVBUP item always points to the last sale order item (FM: SD_FIELD_INPUT_CHECK) and as this is fully delivered, it says that the order is completely delivered and hence delivery date EDATU cannot be changed.
Could anyone please help to resolve this issue?
Thanks,
Sharmila
Edited by: Sharmila Subramanian on Mar 17, 2011 8:17 AMUse following function and update schedule_lines and schedule_linesx table.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx
schedule_lines = i_sched
schedule_linesx = i_schedx. -
How to log the messages in program scheduled background
Hi all,
I have a program and it is to be scheduled to run in the background.
I want to log the messages within the program while running.
What could I do?
(The standard job log is not what I want)
Thanks.Ignore my previous post. It is good that you posted this question, as I learnt something new. Try the code below.
Regarding help for why you require and why to go for application logs, refer this SAP Help
http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa0223493111d182b70000e829fbfe/frameset.htm
DATA: ls_log TYPE bal_s_log.
DATA: p_log_handle TYPE balloghndl.
ls_log-extnumber = 'YMYTEST'.
ls_log-alprog = sy-repid.
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
I_S_LOG = ls_log
IMPORTING
E_LOG_HANDLE = p_log_handle
EXCEPTIONS
LOG_HEADER_INCONSISTENT = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
data: l_s_msg TYPE bal_s_msg.
data: E_MSG_WAS_DISPLAYED type boolean.
data: E_MSG_WAS_LOGGED type boolean.
data: E_S_MSG_HANDLE type BALMSGHNDL.
l_s_msg-msgid = '00'.
l_s_msg-msgty = 'E'.
l_s_msg-msgno = '001'.
l_s_msg-msgv1 = 'This is a test message from 20130810'.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
I_LOG_HANDLE = p_log_handle
I_S_MSG = l_s_msg
IMPORTING
E_S_MSG_HANDLE = E_S_MSG_HANDLE
E_MSG_WAS_LOGGED = E_MSG_WAS_LOGGED
E_MSG_WAS_DISPLAYED = E_MSG_WAS_DISPLAYED
EXCEPTIONS
LOG_NOT_FOUND = 1
MSG_INCONSISTENT = 2
LOG_IS_FULL = 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.
data: I_T_LOG_HANDLE type BAL_T_LOGH.
append p_log_handle to i_t_log_handle.
CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
EXPORTING
* I_S_DISPLAY_PROFILE =
I_T_LOG_HANDLE = i_t_log_handle
* I_T_MSG_HANDLE =
* I_S_LOG_FILTER =
* I_S_MSG_FILTER =
* I_T_LOG_CONTEXT_FILTER =
* I_T_MSG_CONTEXT_FILTER =
* I_AMODAL = ' '
* IMPORTING
* E_S_EXIT_COMMAND =
EXCEPTIONS
PROFILE_INCONSISTENT = 1
INTERNAL_ERROR = 2
NO_DATA_AVAILABLE = 3
NO_AUTHORITY = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Subramanian V.
Maybe you are looking for
-
Mac mini Server mid.2010 upgrade to Mavericks?
Hi, my Mac mini Server (2.66GHz Intel Core Duo, 8Gb RAM) running OS X 10.8.5 does not propose me to upgrade to Mavericks through "Software Update". Does it mean it's not safe to upgrade? Why do I read that a Mac Mini more recent than 2009 can run Mav
-
How to use Setup Assistant in Logic Pro 8?
How to use Setup Assistant in Logic Pro 8? I can't find it! even in the User Manuel! Also, where can we setup the monitor number like we used to set '2 monitor ' in Logic Pro 7's setup assistant Thanks!
-
Please help, I'm unable to send an email with a pdf attachment
We have Windows 8 Pro on the pc, I have been trying to send a pdf document that my husband needs to his work and no matter how I try to send it (either from reader or directly from my email with the attachment it just will not send. Can anyone pleas
-
Sending E-Mail from Multiple Defined E-mail addresses.
Currently we are using exchange 2013. Let's say a user has a mailbox account for John Doe and assign a default e-mail address of [email protected] Now I go ahead and define additional e-mail addresses of [email protected] and [email protected] now Jo
-
Can't open email applicatio​n
Hi, When I try opening the email application (either by pressing the trackball or by pressing the return key) I am taken directly to the blackberry help menu. This just started happening yesterday. I am able to open all other applications. Any inp