ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  ERP CRM  >>  SAP  >>  ABAP
 
 


 

 
 Basis interview questions  Basis Interview Questions
 ABAP interview questions  ABAP Interview Questions
 SAPScript interview questions  SAPScript Interview Questions
 SD interview questions  SD Interview Questions
 MM interview questions  MM Interview Questions
 QM interview questions  QM Interview Questions
 PP interview questions  PP Interview Questions
 PM interview questions  PM Interview Questions
 PS interview questions  PS Interview Questions
 FI CO interview questions  FI CO Interview Questions
 HR interview questions  HR Interview Questions
 SAP CRM interview questions  SAP CRM Interview Questions
 SRM interview questions  SRM Interview Questions
 APO interview questions  APO Interview Questions
 Business Warehouse interview questions  Business Warehouse Interview Questions
 Business Workflow interview questions  Business Workflow Interview Questions
 SAP Security interview questions  SAP Security Interview Questions
 SAP Interfaces interview questions  SAP Interfaces Interview Questions
 Netweaver interview questions  Netweaver Interview Questions
 SAP ALE IDocs interview questions  SAP ALE IDocs Interview Questions
 SAP B1 interview questions  SAP B1 Interview Questions
 SAP AllOther interview questions  SAP AllOther Interview Questions
Question
how top handle error in LSMW?
 Question Submitted By :: Bighnaraj
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how top handle error in LSMW?
Answer
# 1
hi,
In case they are errors that you can/ want to capture 
before proceeding to the session. you can

capture it in the end_of_record area for each record and 
move it to an internal table which can

then be downloaded in the end_of_processing.

Example : You have a loaded material master with the legacy 
material number in BISMT field in

MARA. Let's say you now want to load your inventory. In the 
LSMW for the inventory load you

can do a select and get teh SAP material number for the 
legacy material number provided to you.

In this select if you do not find the SAP material number 
for one material(may be it errored out

during material master load for instance) you can move this 
record to an internal table and in the

processing block when all such errrors have been collected 
in the internal table then you can

download it to your presentation server so you can report 
it to your business users to fix. This is

my preferred method of loading data. Sure it will error out 
int eh batch session as a valid SAP

material number is not provided but then you can never fix 
it automatically. you will have to

process tem in the foreground or in errors mode and this 
invoves a lot of time and developers

intervention. In my way developers intervention is limited. 
A report is generated and then

business will fix the data and the delta loades will have 
to be loaded.

Here's the sample code :

Material Number

BINS-MATNR ()
RLBES-MATNR = BINS-MATNR.
clear RLBES-MATNR.
select single matnr into RLBES-MATNR from MARA
where BISMT = BINS-MATNR.
IF SY-SUBRC 0.
RLBES-matnr = BINS-MATNR.
MOVE-CORRESPONDING BINS TO err_file.
MOVE 'Material not created' TO err_file-error.
APPEND err_file.
WRITE : 'NO MATERIAL'.
skip_record.
endif.

__END_OF_PROCESSING__

FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = error_file_name
TABLES
DATA_TAB = err_file.
IF SY-SUBRC 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

This example used GUI_DOWNLOAD . Ofcourse this is now not 
recommended so you can use the

latest FMs for download.
Thank you.
Regards.
 
Is This Answer Correct ?    1 Yes 0 No
Sukanya.k
[Zen Cybertech.LTD]
 

 
 
 
Other ABAP Interview Questions
 
  Question Asked @ Answers
 
what is the variable to be used in sap scripts to find the total number of pages of the print job? Accenture1
Screen wise process for creating sales order quotation through transaction code VA21  1
what is the use of free and refresh? IBM5
What is reject statement? please reply me breifly?  1
prerequisities of FOR ALL ENTRIES Accenture3
in which method i can upload data to two transactions? and how? somebody tell me.  1
what is the t,code for assign logical systems?  3
what are use of ok_code in bdc Unilogic-Software4
three jobs are there if one fails wat happens?  1
what is difference bt ABAP MEMORY AND SAPMEMORY  1
How can you call a subroutine which is located in program A from program B? CSC3
how we can take a file from Presentation server to Application server? Wipro3
what is the work of buffer in sap ?  1
what are the advantages and disadvantages in LSMW over BDC?  1
in scripts how to upload logo (it's saved in .bmp file ) i am asking procedure? Satyam1
difference between report and module pool Patni4
Explain what are the steps in the SD process at least up to the invoicing stage?  1
DO SERVERS IN EVERY COMPANY HAVE A SPECIFIIC NAME CAN I KNOW THE SERVER NAME OF IGATE AND ITS GEOGRAPHICAL LOCATION AND HOW MANY SERVERS DO A COMPANY WILL HAVE FOR SAP Verizon1
what is the tcode for creating the invoice?  1
In selection screen I have three fields- Plant, Material No, and Material group.If i insert plant how do i get the material no and material group based on plant dynamically? DataMetrix2
 
For more ABAP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com