Hi,all i'm murali,i have one doubt
hi,all i have one doubt most of the times repeated in the interview ,plz solve me.
1. how will u raise exception management in function modules?
2. how to create a check box?
3. in a invoice how can i find the sales order
these r the questions plz give me the perfect answers for these .
waiting for reply.
murali.
Murali,
1.
Exceptions
Our function module needs an exception that it can trigger if there are no entries in table SPFLI that meet the selection criterion. The exception NOT_FOUND serves this function:
Source Code
Having defined the parameter interface and exceptions, we can now write the source code of our function module. To do this, choose Source code in the Function Builder. This opens the ABAP Editor for the include program L of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program.
If the calling program does not handle the exception
The RAISE statement terminates the program and switches to debugging mode.
The MESSAGE ..... RAISING statement display the specified message. How the processing continues depends on the message type.
If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE ..... RAISING statement does not display a message. Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
Source Code of READ_SPFLI_INTO_TABLE
The entire source code of READ_SPFLI_INTO_TABLE looks like this:
FUNCTION READ_SPFLI_INTO_TABLE.
""Local interface:
*" IMPORTING
*" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
*" EXPORTING
*" VALUE(ITAB) TYPE SPFLI_TAB
*" EXCEPTIONS
*" NOT_FOUND
SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
IF SY-SUBRC NE 0.
MESSAGE E007(AT) RAISING NOT_FOUND.
ENDIF.
ENDFUNCTION.
The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
Calling READ_SPFLI_INTO_TABLE
The following program calls the function module READ_SPFLI_INTO_TABLE:
REPORT DEMO_FUNCTION_MODULE.
PARAMETERS CARRIER TYPE S_CARR_ID.
DATA: JTAB TYPE SPFLI_TAB,
WA LIKE LINE OF JTAB.
CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
EXPORTING
ID = CARRIER
IMPORTING
ITAB = JTAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO.
WHEN 2.
MESSAGE E702(AT).
ENDCASE.
LOOP AT JTAB INTO WA.
WRITE: / WA-CARRID, WA-CONNID, WA-CITYFROM, WA-CITYTO.
ENDLOOP.
The actual parameters CARRIER and JTAB have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
2. PARAMETERS p_check AS CHECKBOX .
3.You can find the information in table VBFA.
VBELV - Your Sales Order Number
VBTYP_N - 'M'
VBELN is the invoice number.
Don't forget to reward if useful.....
Similar Messages
-
what are the scenarios we delete the payroll results ,can we suggest the client to delete the payroll result.
Hi,
I would not recommend that you delete the payroll results. What is your issue? Can you provide more background, there may be other options...
Will -
Just updated my iPhone 4 from IOS 6.1.3 to 7.1.2, I know I am behind the times, but I got there eventually! All seems well but I have one specific problem and hope someone can offer a helpful suggestion.
On opening the app "Find my iPhone" I add my password and sign in, to be greeted with a screen that says;
"Update Find My iPhone. A new version of Find My iPhone is available from the App. Store. You must install the update to continue using the app. Update now"
On hitting the "Update now" button I'm taken to the relevant page on the App Store, to be told that I cannot update as it needs IOS8 to be able to continue and as my iPhone is only a 4 cannot install IOS8.
I'm left going around in circles. The only thing would be to delete the app, but looks like I could not re-install the version I would need. Any body have any thoughts or suggestions? (Apart from updating my phone, I have a few months left on the contract!)
Thanks in advance.Hi, thanks for the suggestion. I have tried as you suggested, and when opening the "purchased" apps some have the icloud logo next to them, but I only have "OPEN" against "Find My iPhone". When opening it up, it goes through the same routine; needs to be updated before proceeding, and wouldn't update because I don't have IOS8.
Anything else I could try, or am I doomed!
All of your help is much appreciated, thanks -
hi experts
i have one doubt while running dunning where can i see previous dunning notices. vendor /customerhi
thanks for you answer
regards
naveenkumar -
Actually i have one doubt in message class
Actually i have one doubt in message class. I want create message for following logic.
If the records already exits in database table ,
whatever input i will given in input fields like entry type and material no ,it will need in message.
i want rise the error message in my code like "Record entry type B Material no 029585888 already exits in database table".
I done the coding like.........
in SE80.
IF sy-subrc = 0.
MESSAGE e039 with zdbt-enttyp
zdbt-matnr.
ENDIF.
in SE91.
Record entry type &1 Location &2 already exits in database table.
is it correct? it s not working properly..
could you advice me.......Hello Raju
The only possible problem I see is that in your report you send a message of the wrong message class. Assuming that your message class is ZMSG then assure that your report begins with:
REPORT zreport MESSAGE-ID zmsg.
IF sy-subrc = 0.
MESSAGE e039 with zdbt-enttyp
zdbt-matnr.
ENDIF.
Regards
Uwe -
I have one doubt on Checkbox Conditions
Hi Friends,
I have one doubt on Checkbox Conditions. I had download data into Excel Format. My requirement is suppose I have select 4 checkbox into table click on Download I want to download 4 records into Excel Format.
Now I have Select 4 Checkbox click on download button total records is downloaded
My Req:: I have select 4 checkbox into table click on Download I want to download 4 records into Excel Format.
So I had done Coding also. What I am doing that coding is
1. I have to create one Value Node(IPoDetails_ExcelData)
2. Now Data is available in this Value Node (PoDetails_OutTab)
3. what I am doing here Get the data from this value node (PoDetails_OutTab) and set that data to this Value Node (IPoDetails_ExcelData). Finally add the data to this Value Node (IPoDetails_ExcelData).
Could you check my code. If any problem in that code pls help me.
public void onActiondownloadToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActiondownloadToExcel(ServerEvent)
IPrivatePO_Details_ResultView.IPoDetails_ExcelDataNode ExcelNode = wdContext.nodePoDetails_ExcelData();
IPrivatePO_Details_ResultView.IPoDetails_ExcelDataElement ExcelEle;
wdComponentAPI.getMessageManager().reportSuccess("ExcelNode:"+ExcelNode);
IPrivatePO_Details_ResultView.IPoDetails_OutTabNode StockNode = wdContext.nodePoDetails_OutTab();
wdComponentAPI.getMessageManager().reportSuccess("StockNode:"+StockNode);
IPrivatePO_Details_ResultView.IPoDetails_OutTabElement StockEle ;
//wdComponentAPI.getMessageManager().reportMessage(IMessageCO_EnterStockDetails.SF_UPLOAD, null ,false);
for(int i = 0 ;i<StockNode.size();i++)
{ //wdComponentAPI.getMessageManager().reportSuccess("StockNode.size:"+StockNode.size());
StockEle = StockNode.getPoDetails_OutTabElementAt(i);
//wdComponentAPI.getMessageManager().reportSuccess("StockEle:"+StockEle);
if(StockEle.getCheckBox()== true)
{ wdComponentAPI.getMessageManager().reportSuccess("StockNodeCheck:"+StockEle.getCheckBox());
ExcelEle = ExcelNode.createPoDetails_ExcelDataElement();// Create Element
wdComponentAPI.getMessageManager().reportSuccess("ExcelEle:"+ExcelEle);
ExcelEle.setConf_Shp_Date(StockEle.getConf_Shp_Date()); wdComponentAPI.getMessageManager().reportSuccess("Conf_Shp_Date:"StockEle.getConf_Shp_Date()); wdComponentAPI.getMessageManager().reportSuccess("ExcelEleConf_Shp_Date:"ExcelEle.getConf_Shp_Date());
ExcelEle.setMaterial(StockEle.getMaterial());
ExcelEle.setMatl_Desc(StockEle.getMatl_Desc());
ExcelEle.setOa_Quantity(StockEle.getOa_Quantity());
ExcelEle.setOpn_Quantity(StockEle.getOpn_Quantity());
ExcelEle.setPo_Item(StockEle.getPo_Item());
ExcelEle.setPo_Number(StockEle.getPo_Number()); wdComponentAPI.getMessageManager().reportSuccess("Po_Number:"StockEle.getPo_Number()); wdComponentAPI.getMessageManager().reportSuccess("ExcelElePo_Number:"ExcelEle.getPo_Number());
ExcelEle.setPo_Status(StockEle.getPo_Status());
ExcelEle.setUom(StockEle.getUom());
ExcelEle.setStat_Date(StockEle.getStat_Date());
ExcelEle.setQuantity(StockEle.getQuantity());
ExcelEle.setDeliv_Date(StockEle.getDeliv_Date());
ExcelEle.setExpt_Shp_Date(StockEle.getExpt_Shp_Date());
ExcelEle.setVendor_Material(StockEle.getVendor_Material());
ExcelNode.addElement(ExcelEle); wdComponentAPI.getMessageManager().reportSuccess("H:::ExcelData::::"+ExcelNode.currentPoDetails_ExcelDataElement());
wdComponentAPI.getMessageManager().reportSuccess("H:::ExcelData::::"+ExcelEle.getPo_Item());
// wdThis.wdGetCO_POPendingController().downloadToExcelFile();
// wdThis.wdGetCO_POPendingController().DownLoadToExcel();// Popup Window
//wdThis.wdGetCO_POPendingController().downloadToExcelFile();
//wdComponentAPI.getMessageManager().reportSuccess("Giiiiii");
///wdThis.wdGetCO_POPendingController().DownLoadToExcel();
if(ExcelNode.size()>0)
//wdThis.wdGetCO_POPendingController().downloadToExcelFile(wdContext.nodePoDetails_ExcelData(),getReportingDelays());
//wdThis.wdGetCO_POPendingController().Downlaod();
//wdThis.wdGetCO_POPendingController().downloadToExcelFile();// This is Download Excel Data
IThis is method in CC-downloadToExcelFile and This is Open Popup window DownLoadToExcel(). This method also in CC
wdThis.wdGetCO_POPendingController().DownLoadToExcel();
wdContext.nodePoDetails_ExcelData().invalidate();
else {
wdComponentAPI.getMessageManager().reportException("Please select any one po item from the table",true);
//@@end
Regards
Vijay KalluriHi Vijay,
Please try to use this to implement your scenario:
public void onActiondownloadToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActiondownloadToExcel(ServerEvent)
IPrivatePO_Details_ResultView.IPoDetails_ExcelDataElement ExcelEle = null;
for(int i = 0; i< wdContext.nodePoDetails_OutTab().size(); i++)
ExcelEle = wdContext.createDetails_ExcelDataElement();
Here check condition for selected table checkbox column in nodePoDetails_OutTab()
if (wdContext.nodePoDetails_OutTab().getPoDetails_OutTabElementAt(i).get<Table Column Attribute>.getMdoNo
().equalsIgnoreCase("TRUE")
// Here you need to code for setting table row value in the node Details_ExcelData. Like same as below
ExcelEle.set<Table column Name>(wdContext.nodePoDetails_OutTab().getPoDetails_OutTabElementAt(i).get<Table
Column Attribute>.getMdoNo())
wdContext.nodeDetails_ExcelData().addElement(ExcelEle);
Hope it helps
Regards
Arun -
Hi, In my view, all divide and conquer algorithms have Oefficiency doubt
Hi,
In my view, all divide and conquer algorithms have O(n log n) . But is there anyway to have a divide and conquer algorithm without the O(log n) factor?
Do reply..
Thanksricardo_reli
Welcome to the forum. Please don't post the same question more than once.
I'm locking this thread now. The discussion can continue at
[http://forums.sun.com/thread.jspa?threadID=5342725]
db -
I have 3 computers with 3 different iTunes libraries, can i set up iTunes Match download each library and have all of my music in one place in the cloud?
Yes. By enabling iTunes Match on each computer, each library will be scanned and the Songs will be Matched or Uploaded to the cloud.
Do look carefully at the User Tips area of this forum to help you with the neatest route to success. -
Creating SYNONYM for all tables who don't have one at once!
Hello to all,
I'm trying to create synonyms for every table who's missing one at the moment. I'm trying this code:
declare
cursor cur_objects is
select obj.object_name , obj.owner
from all_objects obj
where owner = '&&SCHEMA_OWNER'
AND NOT EXISTS (SELECT *
FROM all_synonyms syn
WHERE obj.object_name = syn.table_name)
AND obj.object_type = 'TABLE'
AND obj.object_name LIKE 'CI_%';
begin
for rec_objects in cur_objects loop
begin
dbms_output.put_line(rec_objects.object_name);
execute immediate('create public synonym ' || rec_objects.object_name || ' for '
|| rec_objects.owner ||'.'||rec_objects.object_name )
exception when others then
null;
end;
end loop;
end;
I'm getting this error:
ORA-06550: line 10, column 37:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin function package pragma procedure subtype type use
<een ID>
<een scheidingsteken-ID tussen dubbele aanhalingstekens> form
current cursor
I'm still pretty new at PL/SQL and can't get it to work. Does anyone got any tips ?
Thnx alreadyOk now I got this error:
RA-06550: line 17, column 1:
PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem return
returning <een exponent (**)> <> or != or ~= >= <= <> and or
like LIKE2_ LIKE4_ LIKEC_ between into overlaps using ||
multiset bulk year DAY_ member SUBMULTISET_
The symbol ";" was substituted for "EXCEPTION" to continue. -
I am a little scared, since for one week I received to the new Macbook Pro 13 i7, and does few days was working of strange way, since it was beginning to extinguish automatically the screen at any time and any key activates when pressing to enter the open session. I want to know if something is being put rare or is normal, or if desbalanceé the adjustment of economizer or screen or whatever it appears in the panel of system preferences. I have reestablished them almost all, but the problem persists.
I need aid. I do not want that it passes nothing to him and that everything is working well.
I will be thankful for its answers to them. Especially to the technical supportI belive that upgrade to 10.8.4 has troubles.
After this my macbook pro started to go to sleep even that I was working with it.
This morning it became too much. I had worked fine in the evening and this morning the keyboard would not response. Each keypress made sound an evel "click sound".
I ended up needing to reboot the computer. -
I have one doubt on system global area while executing packages
Actually in package we store inter related objects together.
the package contained subprograms will occupy memory in SGA
when we calling subprograms which are present in the package.
if occupy memory in SGA so the packages are how will give performence
compare to the stand alone subprograms?
and the data capacity SGA can store also reduces if subprograms occupy
memory in the SGA. so it is some what degrading of performance.
i want to know while executing subprogrms will these occupy SGA memory
if occupy's the data capacity SGA can store also automatically reduced
how package containde subprograms will give performance?
If u know SGA role let me know?Hi MrHoffman, thanks for your reply!
I know for a fact that the DNS is set to .local - it's the default one so I've never altered that. The changes that occurred seemed to happen after the recent apple security update was applied. If ".local" causes so much trouble is there a reason that it's the default? (I'm not that technically minded - it's just a wonder more than anything.)
Upon closer inspection I can see that the hostname has had two hyphens added to it, where the spaces are in our business name. (Previously it was named without the spaces, just all typed as one word.)
I guess that if there was a long delay in the DNS update then maybe it would account for the user suddenly being unable to connect/use the server.
As for the users, I know where I can see the list of them, the thing is that previously there were only 4 in the list, now there's 85, including a new "System Administrator". It's functioning normally again, but I guess I was really looking to see if anyone else had seen the user list grow without prompting. If it's normal then that's totally fine with me, but as I say it freaked me aout a little when there are suddenly a bunch of new users on the list.
Cheers again!
M: -
Amrish,
I have 15 items in sales order, but how the system do the delivery is
it has to take one item per day and should deliver upto 15 days....
how it possible???
If we do manually it is possible... but this should do automatically...
for this i have go for sm35?Hi,
I think you will have to go for a BDC.
Second option to to split the scedule lines in 15 days automatically.
And schedule the program for delivery creation on daily basis,so this should create a seprate delivery for each line item.
Again a big Z coming into picture.
Regards,
Amrish Purohit -
Hi Experts,
I am created RFC function module for placing in BOR, but it is not released ,
can any one tell me anything happens or not.
Thanks,
Ravindra.Please search before posting, please use meaningful subject lines.
Thread locked
Thomas -
Hi friends i have one doubt on price indicator.
for subcontrcacting semifinished goods what should be the price control indicator( V/ S ). and i also like to know why.
Hi.
Price control indicator is totally depends on the customer requirement.
If you opt for standard price you have the liberty to change over to moving avg price at any time.
Also systems will, calculate the moving avg price and it will be displayed in the material master but this is only for statistical use only.
But when you choose price control as V initially, you cannot revert back to S unless Costing department evaluates it.
If it helps award me.
Cheers!!!
Umakanth -
I HAVE ONE DOUBT ON DML OPERATIONS?
KINDLY GIVE ANSWERS PLZ
ANOTHER QUESTION:
I AM SELECTED ONE TABLE THAT TIME TABLE WILL BE LOCKED OR NOT?
IF I SELECT A TABLE THE OTHER USER CAN ACCESS THE SAME??
ANOTHER QUESTION:
I AM OPENED TWO SQL* PLUS IN MY SYSTEM. ARE THEY COMES UNDER SINGE SESSION?
OR TWO DIFFERENT SESSIONS?
WITH THOSE CAN I FELL LIKE TWO DIFFERENT USERS?
ANOTHER QUESTION:
I AM UPDATEING MY TABLE AT THE TIME THE TOTAL TABLE WILL BE LOCKED
AT THE SAME TIME OTHER USERS ALSO TRYING FOR SAME TABLE CAN HE EVEN SELECT THE TABLE???????
AS PER MY KNOWLEDGE HE CAN NOT ACESS THE TABLE. AM I THINKING RIGHT?
ANOTHER Q?
MORE THAN ONE PROGRAMMER CAN SELECT A TABLE AT THE SAME TIME?
ADVACED THANKS.KINDLY GIVE ANSWERS PLZ
ANOTHER QUESTION:
I AM SELECTED ONE TABLE THAT TIME TABLE WILL BE LOCKED OR NOT?
IF I SELECT A TABLE THE OTHER USER CAN ACCESS THE SAME??
A SELECT would not lock a table.
ANOTHER QUESTION:
I AM OPENED TWO SQL* PLUS IN MY SYSTEM. ARE THEY COMES UNDER SINGE SESSION?
OR TWO DIFFERENT SESSIONS?
Two Different Sessions
WITH THOSE CAN I FELL LIKE TWO DIFFERENT USERS?
Didn't quite get your question.
ANOTHER QUESTION:
I AM UPDATEING MY TABLE AT THE TIME THE TOTAL TABLE WILL BE LOCKED
Only those rows which you are UPDATing will be locked.
AT THE SAME TIME OTHER USERS ALSO TRYING FOR SAME TABLE CAN HE EVEN SELECT THE TABLE???????
Yes. SELECT is always permitted
ANOTHER Q?
MORE THAN ONE PROGRAMMER CAN SELECT A TABLE AT THE SAME TIME?
yES.
ADVACED THANKS.
Some users consider using Upper case to be Shouting/Offensive.
Maybe you are looking for
-
the question is:can I cancel my e-mail account on apple icloud mail without cancelling my initial apple identity?I noticed that my real name appears as the sender of the message while I prefer to use the same user identity I chosed as user name fo
-
How to add a View in ViewContainerUiElement dynamically
Hi All, I am facing some issues while trying to add a view in the dynamically created ViewContainerUIElement. Can someone please help me out. Thanks and Regards, Gaurav.
-
Boot camp error installing Windows 8.1 "An unexpected I/O error has occurred"
Well, just like it says on the title, when im going to install windows 8.1 in my MBP (late 2011 13" i7) it gives me a blue screen and the message "RECOVERY There was a problem with a device connected to your PC An unexpected I/O error has occurred Er
-
Change Of Asset Master Record?
For one of my client, they had created couple of asset master records and posted the depriciation for 6 months.Now auditors suggested they wanted to move this asset master record to another master.already they had posted depriciation also. auditors s
-
My system is beachballing every 3 minutes or so, I read in a thread that by installing Shark tools and doing a system trace when the error occurs, you might find the source of the problem. I did a system trace and I keep getting postmaster processes