What is the exact reason behind this

Hi,
Can some one say why the output of the following program results
251.67000000000002.
Mathematically above is wrong. What is the meaning fo the last digit 2;
Mathematically it should result 251.67
double y= 258.67;
double z= 7.00;
System.out.println("value of y-z is "+(y-z))
Waiting for a early reply

It's not your problem It's Java problem whichgives
an error. Just post this reply to the java bugforum
NileshIf it's a java bug, it's a bug in every languagein
in the world that uses floating point math!!!!
Not to mention of course that the decimal system
itself has similar types of "bugs".Is that why (1.0/3.0) + (1.0/3.0) + (1.0/3.0) yields 0.99999999 instead of the correct anser of 1.0 on my decimal computer?

Similar Messages

  • I love my Verizon, yes I really love my verizon that the only reason behind this story

    Hi there,
    I love my Verizon, yes I really love my verizon that the only reason behind this story but the service made me hate the same Verizon. When I took the Verizon connection I was so happy because I am doing a right thing. but now I feel the same that I have done a wrong thing.
    1. Gift Card is reaching me till now.. hope I will get it when my contract ends!!!
    I ordered this FiOS service by February and got a offer of 200$ gift card from Best Buy... I am getting the card till now.. no tracking.. no response... whenever I call them the response is really very nice. the call will be on hold for about an hour and then a voice will come then I have to explain the situation for about 20 mins, then he/she find the gift card is delivered to some other address. Then give me a waiting period of 3 weeks. I have waited atleast 5 * 3 weeks, between these period of time atleast 20 calls to you guys.
    Don't you think how lucky I am... ha
    A GREAT customer service.. which made me so happy. Thank you one and all.
    2. Billing Issues:
    I took a plan called FiOS freedom bundle offer. It costs  $ 94.99 when I ordered, but later I came to know that is excluding taxes, that is fine so the total expected was some where around 105 to 110 $. But how great it worked for me... I haven't paid that less amount till now. see how much I paid till now...
    Month Amount
    March $189.53
    April   $120.07
    May   $120.07
    June  $113.40
    July   $113.39
    and now the story begins again...
    August $152.83
    Whenever I call the customer care to ask clarification they will tell "**this will not be charged from next month". But there will be no answer why that was charged. I never even thought of writing this big story to some one like you but I am really sorry to say if this continues then your business will never endup in success.
    Please consider this as me one and only request and do something.
    $200 worth of Best Buy gift Card and
    Take away all the additional options in my package and give me the bundle offer bill I ordered $94.99 + Taxes. I wont encourage paying not even one dollar more than that.
    With lots of worries on my ever best Verizon,
    James {personal information removed for privacy}
    Message Edited by CharlotteS on 08-14-2008 08:35 PM
    Solved!
    Go to Solution.

    Since this is a user Forum, James, you'll probably need to contact Verizon again.  Contact Us  
    The only thing I can offer is this link:  http://www22.verizon.com/awaitingfreereward/  
    Good luck and sorry we couldn't be more of a help.

  • What is the exact problem with this file?

    Hi all,
    There is an old form , which was not in use from many days.
    Now when we tried to run the form, i got the error saying "FRM-40734:Internal Error:Pl/SQL error occured.", in the login form.
    When i tried to open the fmb file in Oracle Forms Builder 6i, i got the following error:
    FRM-10102: Cannot attach PL/SQL library d2kwutil. This library attachment will be lost if the module is saved., but the fmb file got open.
    The login button has the following code:
    DECLARE
      UNAME VARCHAR2(30);
      --USER_ID PARAMLIST;
      V_USER APUSERMA.USER_NAME%TYPE;
      V_PASSWED APUSERMA.USER_PASSWD%TYPE;
    BEGIN
    select user_CD INTO :GLOBAL.USER_ID from apuserma 
    where user_CD = :TI_USER_NAME AND user_PASSWD = :IT_USER_PASSWD
    AND SYSDATE BETWEEN USER_VALID_FRM AND USER_VALID_TO;
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    :global.compname := :compname;
    compnm(:compname);
    --USER_ID := CREATE_PARAMETER_LIST('USER_id_NAME');
    call_form('Forms\MAIN_SCREEN',hide,DO_REPLACE);
    exception
      when no_data_found then
      MESSAGE('Incorrect Username or Password.  Please Re-Enter');
      message(' ');
      RAISE FORM_TRIGGER_FAILURE;
    END;
    EXIT_FORM;
    When i tried to compile, i got error saying ,
    Error 201 at line 10, column 28
    identifier 'WIN_API_ENVIRONMENT.READ_REGISTRY' must be declared.
    I am not getting to know What is the exact problem with this file?
    Help me with this please.
    Thank You.
    Oracle forms builder 6i.
    Oracle 9i.

    Vijetha wrote:
    I also want to know what is the use of  win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername') ??
    What does it do??
    If i comment the following line , will it be a problem??
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    Because i commented the above line & compiled, so it is not giving any error now.
    So please tell me what win_api_environment.read_registry does??
    it's read windows registry value. So, no problem if you comment it.
    Thanks

  • What are the possible reasons why this R3 info not getting to BW?

    Hi,
    I have data coming into BW from R3 a datasource DataSorce1; When it gets to BW, SalesOrg numbers 22941 and 22942 comes to BW without problem but 22943 which is a new config. In the R3 master data does not get to BW.
    1. What are the possible ways to troubleshoot this?
    2. How can I confirm that the data shows in R3: i.e. showing my SalesOrg 22941 and 22942 in R3, and also confirm that 22943 truly exists in R3.
    3. How do I confirm that 22943 did not get to BW (if it exists in R3)?
    4. What if this is some custom program bringing 22941 and 222942 to BW? How do I see the program name and track down why the third one is not getting to BW?
    Please provide the necessary to tcode in all the discussions
    Thanks

    1. 1st thing... If there is no Sales againest Sales Organization. you won't see in Cubes if it is part of Transactional Data. <u>Load New Sales Organization Texts</u>.
    1.  If it is new Sales Organization as Navigation Attribute only(Assume for Sales Order), try activate your master data for Sales Order. check in your Sales Organizatio IO Master Data and Sales Order Master Data
    2. If it is Part of Transactional Data, Check in your RSA3, PSA.
    How to check in RSA3?: If you are usng 2LIS_11_VAHDR. goto se16, provide VBAK table, press enter. in the Select for Sales Organization. Put 22943. Provide Order type Standard Order. and Execute. Take any Order Number from output list.
    Goto RSA3, provide your choosen sales order in the RSA3 selection in Sales Order field Execute it.
    If you are able to find this Sales Order in Both RSA3 and PSA. You are getting Data for 22943 Sales Organization.
    case 1: If you are able to see Choosen Sales Order in RSA3, not in PSA. check User Exit Code.
    case 2 : If you are able to see Choosen Sales in PSA and Not in Targets. check all transformation.
    Are you working with Standard DS(2LIS_11_) or Custom Datasource(Z)?
    Nagesh Ganisetti.
    Assign points if it helps.

  • What was the original reason behind the 1.5 interface?

    Anyone knows? The fact that the update pops up in "Software update" makes no sense to me if it's only intended for a small majority of users. Any thoughts about why the MBPs were shipped "crippled" to start with?

    Haricot wrote:
    Right. But I've been using macs since 1984 so I know what to do when I see a firmware pop up but do you really think I'm in the majority? The majority is going to install the firmware.
    Yes, but 'the majority' are unlikely to perform hardware upgrades themselves, and so, will be unaffected in any case.
    So my original question was: What were the motives of Apple behind the original 1.5 interface?
    The answer above still holds - we are users like you, and have no insight into the thought processes of the engineers at Apple. You will not get an answer from Apple here. Of course, you are free to while away the summer hours waiting for one...

  • What's the common reason for socket write errors?

    I just encountered some problem in my recent programming work.
    The error message is something like "java.net.SocketException: Software caused connection abort: socket write error", strangely enough, sometimes it can work without the error, but sometimes, the error occurs with the same test case.
    I just want to know what's the mainly reason of this error?
    Thanks a lot.

    After checking the codes, I realized that it is because when I return a String object from an function and send it to the other end through socket, sometimes the other end receive a "null" object, and because I have to use the instance method of the object, so the error occured.
    But I am confused why I send a string to socket, but sometimes I got a "null" object at the other end, I am sure the string I send is actually not "null" the the send side?

  • HT201250 I use Time Machine to back up my entire computer with my external hard drive. I am getting a brand new iMac this month and was wondering what is the process of using this back up to restore my new computer exactly how my old computer was?

    I use Time Machine to back up my entire computer with my external hard drive. I am getting a brand new iMac this month and was wondering what is the process of using this back up to restore my new computer exactly how my old computer was? I want to make sure I will still have various important files on my new computer, like my songs in iTunes, my photos in iPhoto, etc, etc. Thanks so much in advance!

    Welcome to the Apple Support Communities
    When you turn on the new iMac for the first time, Setup Assistant will ask you to restore a backup, so connect the external disk and follow steps to restore all your files to your new iMac. Your new Mac will have the same settings and programs as your old computer.
    In other cases, I would recommend to restore the whole backup without using Migration Assistant or Setup Assistant, but a Late 2012 iMac uses a special OS X build, so the OS X version that you're using on your old Mac won't work on the new one. For more information, see > http://pondini.org/OSX/Home.html

  • OS X says that Compressor was modified since the code sign and won't let me launch it. Any reasoning behind this?

    Hello
    After updating Compressor to the most recent version (4.2), I get a message saying that Compressor was modified since the code sign and then won't let me launch it.
    I have tried reinstalling Compressor restarting and updating my computer.
    Any reasoning behind this problem??
    Thanks
    I am running OS X Yosemite 10.10.3 on a 2013 13inch MacBook Pro, 8GB RAM, 2.8GHz i7.

    Start the computer from the installation disk and perform Repair Disk and Repair Permissions using Disk Utility

  • What are the various reasons that result in locking an user login id .....

    what are the various reasons that result in locking an user , for development server?

    Hi,
    Basic reason behind the locking user id is incorrect logons.
    Goto Tcode : S_BCE_68001402 .
    You can find the exact number of incorrect logons and reason.
    regards,
    Raju

  • How to find out the exact reason for backordered order in oracle apps R12

    Hi,    
         I am new to OM module.I booked an order and trying to do "pick release" the booked order but i couldn't do so, because the order is getting backordered.
    These are the things i checked
    1.On-hand quantity for the particular item i am booking is sufficient enough
    2.Item is in M1 org and onhand quantity is also in same org.
    Can you please help me how to find the exact reason for my order getting backordered.
    Regards
    Sandeep.G

    Hi Sandeep,
    Reasons for pick release resulting in back ordered can be found here:
    Reasons for a Sales Order to get Backordered!
    Failing pick release, orders getting backordered and other common issues with picking.
    Please review notes:
    Cannot Pick Release Items, Completes with Warning and the Item is Backordered. (Doc ID 1240404.1)
    Pick Release Process Completes In Warning Line Gets Backordered Though Onhand Is Present (Doc ID 1285514.1)
    Pick Release Backorders Sales Order Lines, Error in Log File "No Mtl_Sales_Order ID found for oe header" (Doc ID 398385.1)
    Reservation Remains After Pick Release Of Backordered Move Order (Doc ID 754518.1)
    In addition, please review:
    What is Back Order in OM? How are Backorders Handled | Oracle Apps
    Thanks &
    Best Regards,

  • What Are the Exact Basic rules for Replying a Thread...... -:)   @};-

    Hi Experts,
    After Looking into the forums many days I had a small conclusion about forums,
    SAP Forums are better place I have seen for getting a goo dhelp & Knowledge...
    Why can't we make it a BEST Place.
    This is just a small doubt which I would like to clear myself first,
    I have seen many users In the forums asking for a Basic Questions
    When cleared, But still they want to have a Spoon feeding with a Sample Code.
    When Sample Code Given they will provide the original code and requests for Modifications.
    These always looks to me as crazy.
    I have seen somelong time agin by moderators posting that In SCN there will be no SPOON FEEDING.
    I am not sure whether if still this Rule AVAILABLE or NOT.
    Ok if the task is really difficult let them ask again and again,
    And it was not replied, let them repost, I agree with them.
    And How about a User Registered in SDN very long back and asking for a silly question in below thread,
    [Sendin Email to the recipent list -Need correct FM |Getting the address from shipto partner of Bil. item not directly from C.ma]
    This is one more example, really funny, The thread poster needs the solution at any cost, he doesn't require and Suggetions,,, {He Only needs Solution}
    [Radio Buttons |Radio Buttons;
    [Turning Off Debugger |Turning Off Debugger;
    [Regarding Amount in words|Regarding Amount in words;
    There are 100's of threads like this....Everyone knows this facts.
    Check this who answered this one and who replied correct answer, who copied, finally who was rewarded...!
    [how to validate POsting period |Re: how to validate POsting period]
    Now My Real Problem is....!
    User is always intelligent, Only the weakness is in Contributor, trying to help them,..,
    And I openly say that Someone requesting for basic help is not DUMB, But the Contributor replying forgets
    the basic rules " Why Contributing ?"
    According to me It's not the Requestor to see Rules & Requlations before posting the threads,
    But its responsibilty for the Contributing person to see th Rules & Requlations before replying the threads,
    If we follow the rules and stand on a single word or rule or anything there will be Good Result.
    Major Problem is in US not anyone else.
    Example Some one saying search in the forum,,, then please no replies after that...
    But we are very pity hearted again we post the solution,,,
    But it is not at all enough(for cintribtor's)... they will copy the solution and post again by slight Modifications,
    And Some users are having 500,600,700,800 Posts with 0 points, registered long long back.
    They are completly dependent on forums,,, As they goto office and as they eat, The same they open forums and ask Queries...
    They will never realize what they are doing,, and we will never let them improve better...
    Finally Lets Discuss About this and Correct & Suggest me if I am wrong,
    Is my thoughts are going in the right way or not I am not even sure... Please Aslo Correct me if I did any mistakes.
    Thanks & regards,
    Dileep .C
    Edited by: Dileep Kumar Chinnaiah on Apr 29, 2009 12:33 PM
    Title Changed Form
    "What to do when someone asking for Basic Questions" to "What Are the Exact Basic rules for Replying a Threads...... "

    Hi Stephen,
    Very useful Information,
    First tell me a little something about my self...
    After completion of my certification(as a fresher) I was down the streets hunting the job,
    with the insufficient knowledge and being a non-experienced person, I never got one.
    And mean while when I got my "S-UserID", I used to be proud, To say frankly, I registerd in SDN & SAP all at a time, without even knowing what I can do there..,
    When I got a job afterwords I was doing the job and never seen SDN page for many months,
    when I came to know that of we have doubts we can post at SDN. then started requesting help,
    I posted only a little, I didnot got the proper response. on that day I decided,
    still there are some places where we cannot get help on time and there will be people waiting to get help,
    Why cant I put some of my efforts to help others.
    Then I searched some topic by Topic in SDN topic by Topic I used to read threads just for knowledge.
    when I feel my self comfort for contributing, I started contibuting...!
    If you haven't read it, take a look first, so you can understand where things are now.
    I dont know where things are now. But these in this thread I mentioned clearly what I seen from the day I started contributing.
    I searched with the terms of 'Rules for replying', The results are not as I expected, and this link has subject as
    "O SDN, where art thou?" So it dosent hit my in the list.
    Like everybody until a certain stage I am also rushing for points.
    But I most cases I never tried to copy paste answers. If I done some then that is just to point it myself some day,
    I have no hopes or no intrest on the points...! This was discussed with Rob & Matt, at my inital contribution where my points are 36.
    From that day till date I have changed a lot to myself.
    Everyone cannot change like me because they are not like me & And I dont even expect that...!
    I will be online almost 6-8Hrs a day, Not even getting intrest to see the forums just because of the co-contributors.
    My only point is I am just requesting to a co-contributor,
    Clearly In a example : Lets say contributor has replied to a thread, and if you know that is a correct solution,
    please dont reply any more, If you have a better solution than that, then only reply,
    Even there is one reply in the thread not a matter, if correct answer leave that query.
    If still error persists, Show up with your Idea's...
    Dont let down the contributor, by copying his reply and editing and pasting(edit only if incorrect).
    I am just looking for this one exactly to circulate between ourselfs.
    For this we a little support from moderators to circulate(may be as a rule or may be as a mail to them)
    You may say again how many mails we have to send, It dosent matter, one mail to one person one time,
    and +ve factors will show up definetly.
    A real contributor always understand what I am talking about, but some one who hunts for points will never.
    I am really sorry if I am troubling with my doubts & requests,
    If so, Pleae forgive me,,
    Thanks & regards,
    Dileep .C

  • What is the exact technical difference between "Lightning to USB Camera Adapter" and "Lightning to USB Cable"

    Mainly I am interested in attaching the iPhone to a receiver (or car etc.) to play music.
    Both the "Lightning to USB Cable" and the "Lightning to USB Camera Adapter" seem to do the trick. So what is the exact technical difference between the two items?
    When connected to a receiver, is the iPhone the USB Master in both cases? Is the USB "Audio Device Class" standard used to transmit audio?

    Thanks for all the answers! I think I should specify the use case much more clearly. Sorry for not having done this earlier.
    Use Case 1:
    When I connect the iPhone to the receiver I can use the Lightning to USB, because the receiver has a female type A, just like e.g. a PC or like the charger. So I would agree that the Receiver must be the USB host, and the iPhone the USB device. This works just fine in my case, with iPhone and iPad.
    In this case, the audio goes from the device to the host, or "Audio-in".
    Use Case 2:
    A friend of mine has a small device that converts USB to Toslink. This thing has a female Mini USB Type A, which is typically used at the receiving side of a USB connection. This device can be connected e.g. to a Mac, and then the Mac can output audio via this device to receiver which accepts optical Toslink signals.
    In this case, the audio goes from the host to the device, or "Audio-out".
    It is this use case 2 that I am unsure about:
    a) Can the Lightning to USB cable be used in this case (assuming that I find the necessary non-standard adapters to actually connect the USB ports)? This would mean that the iPhone can act as a USB host with the Lightning to USB cable.
    b) I know that the Lightning to USB Camera Adapter does convert the iPad into an USB host, otherwise it could not read data from a camera. So could this adapter also be used to produce "Audio out" to a USB device that supports receiving music?
    If yes, would this also work with an iPhone (as pointed out in another answer, the iPhone does nor support reading pictures from a camera)?

  • What is the exact way of doing BDC ?????

    I know when the input is minimal we have to use CALL TRANSACTION method in BDC and when we have batch of input files we have to use BDC Recording.
    My question is what is the exact way of doing BDC.
    Could any one please tell me the exact way of doing BDC Recording Process.
    I appreciate your help.
    Thanks for your Time.
    Shiv.

    Hello Sivaramu,
    Call transcation can handle only one Trasaction(Tcode).
    Session method can handle multiple transcations.  
    Before getting started with the Recording process...we have to know the transcation code. We do recording to record the screen number, screen values,  Button values(OK codes) ...etc
    For example...while recording we create a record using some t-code (Say MM01) ...Now, we will create a materail master record using the Recording process.
    Let us see the process of recoding a single record with MM01 using SHDB(A tool used to record the details of T-code)
    Go through these steps for recording by using SHDB.
    How to use recording :
    Go to SHDB
    --> Click on New Recording
    --> Provide any name in Recording , For ex: Z_CHAITU
    --> Provide the Transaction name as “MM01”
    --> Select the update mode as Synchrounous or Asynchrounus method
    --> Click on Start Recording button.
    --> It will display MM01 screen….type the appropriate
    information in it.
    --> Type the Material no as : 4567E (Any no, But there should b 1 Character in it)
    --> Type Checmical Industry in INDUSTRY SECTOR
    --> Type COUPONS in MATERIAL TYPE
    --> Now click on Select Views button.
    --> Select BASIC DATA 1
    --> Click on Ok button
    --> Under Basic data tab under Material, it will display the Material number.
    --> Type the short description and “Provide EA as Base Unit Of Measure”
    --> CLICK ON BACK AND IT WILL ASK U TO SAVE THE DATA, CLICK ON YES
    --> Again click on Back, it will ask if u wish to save the changes to record entries.
    -> Click on Yes
    --> Now, u will be in Initial screen
    --> Select the record and Click on Program button
    --> Now, provide any program name
    --> Now, select ‘Transfer from recording’
    --> Click on Tick mark
    --> Give some short description
    --> Type as Executable
    --> Click on Source Code button
    --> Automatically the code will appear in SE 38 program.
    U can try these steps with any T-code by knowing the Mandatory fields in it.
    ---> *Now by following all the above steps ur done with the recording process to create a single record in MAterail master (MM01).  Now, we use the same recording process and put this recording under Loop in report program.*
    So that, it will follow the same steps automatically to create materail master records from the flat file. If you have 10 records in flat file(Note pad) then it will do the same process for 10 times to upload 10 records from the flat file using the recoding process that we have done by using the SHDB
    If you want then i will provide you with the sample program to upload the data for MK01 using Call transcation and Session method.
    Call transcation method for MK01:
    U can try these steps with any T-code by knowing the Mandatory fields in it.
    & TITLE  : BDC FOR MK01
    *& DESCR  : UPLOAD THE DATA THROUGH FLAT FILE
    *& TRANSPORT : DOLK901203
    *& VERSION : V1
    *& DATE  :  17th , JAN , 2008
    report Z24_BDC_MK01
           no standard page heading line-size 255.
    *& DECLARATIONS OF STRUCTURE FOR MK01
    TYPES : BEGIN OF TY_MK01 ,
             KTOKK TYPE RF02K-KTOKK ,
             NAME1 TYPE LFA1-NAME1 ,
             SORTL TYPE LFA1-SORTL ,
             PSTLZ TYPE LFA1-PSTLZ ,
             LAND1 TYPE LFA1-LAND1 ,
             END OF TY_MK01 .
    *& DECLARATION OF INTERNAL TABLE
    DATA : T_MK01 TYPE STANDARD TABLE OF TY_MK01 INITIAL SIZE 0 ,
           T_BDCDATA TYPE STANDARD TABLE OF BDCDATA INITIAL SIZE 0 ,
           T_BDCMSGCOLL TYPE STANDARD TABLE OF BDCMSGCOLL INITIAL SIZE 0 ,
           T_ERROR TYPE STANDARD TABLE OF TY_MK01 INITIAL SIZE 0 ,
    *& DECLARATION OF WORK AREA
           W_MK01 TYPE TY_MK01 ,
           W_BDCDATA TYPE BDCDATA ,
           W_BDCMSGCOLL TYPE BDCMSGCOLL .
    *& DECLARATION OF SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME .
    PARAMETERS : P_FILE TYPE FILENAME .
    SELECTION-SCREEN END OF BLOCK B1 .
    *& DECLARATION OF START-OF-SELECTION
    START-OF-SELECTION .
    PERFORM SUB_UPLOAD_DATA .
    PERFORM SUB_POPULATE_BDC .
    PERFORM SUB_ERROR_REC .
    *include bdcrecx1.
    *&      Form  SUB_UPLOAD_DATA
          text
    form SUB_UPLOAD_DATA .
    DATA  : L_FILE TYPE STRING .
         L_FILE = P_FILE .
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         filename                      = L_FILE
         HAS_FIELD_SEPARATOR           = 'X'
       tables
         data_tab                      = T_MK01 .
    endform.                    " SUB_UPLOAD_DATA
    *&      Form  SUB_POPULATE_BDC
          text
    form SUB_POPULATE_BDC .
    LOOP AT T_MK01 INTO W_MK01 .
    DATA : L_MSG TYPE STRING .
    REFRESH T_BDCDATA .
    perform bdc_dynpro      using 'SAPMF02K' '0107'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-KTOKK'
                                   W_MK01-KTOKK.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-LAND1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-NAME1'
                                   W_MK01-NAME1.
    perform bdc_field       using 'LFA1-SORTL'
                                   W_MK01-SORTL.
    perform bdc_field       using 'LFA1-PSTLZ'
                                   W_MK01-PSTLZ.
    perform bdc_field       using 'LFA1-LAND1'
                                   W_MK01-LAND1.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    CALL TRANSACTION 'MK01' USING T_BDCDATA MODE 'N' MESSAGES INTO T_BDCMSGCOLL .
    IF SY-SUBRC <> 0 .
    APPEND W_MK01 TO T_ERROR .
    ENDIF .
    CLEAR W_BDCMSGCOLL .
    READ TABLE T_BDCMSGCOLL INTO W_BDCMSGCOLL INDEX 1 .
    CLEAR L_MSG .
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = W_BDCMSGCOLL-MSGID
       LANG            = SY-LANGU
       NO              = W_BDCMSGCOLL-MSGNR
       V1              = W_BDCMSGCOLL-MSGV1
       V2              = W_BDCMSGCOLL-MSGV2
       V3              = W_BDCMSGCOLL-MSGV3
       V4              = W_BDCMSGCOLL-MSGV4
    IMPORTING
       MSG             = L_MSG
    EXCEPTIONS
       NOT_FOUND       = 1
       OTHERS          = 2
    IF sy-subrc = 0.
    WRITE : / 'MESSAGE FOR ' , W_MK01-KTOKK ,'-------' , L_MSG .
    ENDIF.
    ENDLOOP .
    endform.                    " SUB_POPULATE_BDC
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR W_BDCDATA.
      W_BDCDATA-PROGRAM  = PROGRAM.
      W_BDCDATA-DYNPRO   = DYNPRO.
      W_BDCDATA-DYNBEGIN = 'X'.
      APPEND W_BDCDATA TO T_BDCDATA .
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
        CLEAR W_BDCDATA.
        W_BDCDATA-FNAM = FNAM.
        W_BDCDATA-FVAL = FVAL.
        APPEND W_BDCDATA TO T_BDCDATA .
    ENDFORM.
    *&      Form  SUB_ERROR_REC
          text
    -->  p1        text
    <--  p2        text
    form SUB_ERROR_REC .
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'C:/ERRORS OF MK01.TXT'
       WRITE_FIELD_SEPARATOR           = 'X'
      tables
        data_tab                        = T_ERROR .
    endform.                    " SUB_ERROR_REC
    Session Method for MK01:
    *& PURPOSE : This BDC report is used to upload all the vendor master
    *&           data in to SAP using SESSION METHOD with handling the errors
    report Y035_SESSION_METHOD
           no standard page heading line-size 255.
    *& Structure declaration
    *Structure Declaration for source internal table
    TYPES : BEGIN OF TY_UPLOAD,
              LIFNR TYPE RF02K-LIFNR,
              EKORG TYPE RF02K-EKORG,
              KTOKK TYPE RF02K-KTOKK,
              NAME1 TYPE LFA1-NAME1,
              SORTL TYPE LFA1-SORTL,
              LAND1 TYPE LFA1-LAND1,
              SPRAS TYPE LFA1-SPRAS,
              WAERS TYPE LFM1-WAERS,
            END OF TY_UPLOAD.
    *& Internal Table declaration
    *Internal Table Declaration for source table
    DATA : T_UPLOAD TYPE STANDARD TABLE OF TY_UPLOAD INITIAL SIZE 0,
    *Internal Table Declaration for bdcdata
           T_BDCDATA TYPE STANDARD TABLE OF BDCDATA INITIAL SIZE 0,
    *Internal table declaration for BDCMSGCOLL (To handle the errors)
           T_BDCMSG TYPE STANDARD TABLE OF BDCMSGCOLL,
    *Internal table declaration for reprocess the errors
           T_ERRORS TYPE STANDARD TABLE OF TY_UPLOAD INITIAL SIZE 0,
    *& Workarea declaration
    *Work area delaration for source table
           W_UPLOAD TYPE TY_UPLOAD,
    *Work area delaration for bdcdata
           W_BDCDATA TYPE BDCDATA,
    *Work area delaration for BDCMSGCOLL
           W_BDCMSG TYPE BDCMSGCOLL.
    *& Selection screen declaration
    *Selection Screen declaration
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS : P_FLNAME TYPE FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
    *& Start of selection declaration
    *Start of selection declaration
    START-OF-SELECTION.
    *Upload the data
    PERFORM SUB_UPLOAD_DATA.
    *Populate the BDC data
    PERFORM SUB_POPULATE_BDC.
    *Process the error records
    PERFORM SUB_ERROR_RECORD.
    *include bdcrecx1.
    *&      Form  SUB_UPLOAD_DATA
          This subroutine is used to upload the data
    FORM SUB_UPLOAD_DATA .
    DATA : L_FLNAME TYPE STRING.
    L_FLNAME = P_FLNAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = L_FLNAME
      FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = T_UPLOAD.
    ENDFORM.                    " SUB_UPLOAD_DATA
    *&      Form  SUB_POPULATE_BDC
          This subroutine is used to populate the BDC data
    FORM SUB_POPULATE_BDC .
    DATA : L_MSG TYPE STRING.
    *To oper a sesion in SE35
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
       CLIENT                    = SY-MANDT
       GROUP                     = 'MAMA_SESSION'
       USER                      = SY-UNAME
       KEEP                      = 'X'
       HOLDDATE                 = '20080129'
       PROG                      = SY-CPROG.
    LOOP AT T_UPLOAD INTO W_UPLOAD.
    REFRESH T_BDCDATA.
    perform bdc_dynpro      using 'SAPMF02K'         '0107'.
    perform bdc_field       using 'BDC_CURSOR'       'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'       '/00'.
    perform bdc_field       using 'RF02K-LIFNR'      W_UPLOAD-LIFNR.
    perform bdc_field       using 'RF02K-EKORG'      W_UPLOAD-EKORG.
    perform bdc_field       using 'RF02K-KTOKK'      W_UPLOAD-KTOKK.
    perform bdc_dynpro      using 'SAPMF02K'         '0110'.
    perform bdc_field       using 'BDC_CURSOR'       'LFA1-SPRAS'.
    perform bdc_field       using 'BDC_OKCODE'       '/00'.
    perform bdc_field       using 'LFA1-NAME1'       W_UPLOAD-NAME1.
    perform bdc_field       using 'LFA1-SORTL'       W_UPLOAD-SORTL.
    perform bdc_field       using 'LFA1-LAND1'       W_UPLOAD-LAND1.
    perform bdc_field       using 'LFA1-SPRAS'       W_UPLOAD-SPRAS.
    perform bdc_dynpro      using 'SAPMF02K'         '0120'.
    perform bdc_field       using 'BDC_CURSOR'       'LFA1-KUNNR'.
    perform bdc_field       using 'BDC_OKCODE'       '/00'.
    perform bdc_dynpro      using 'SAPMF02K'         '0310'.
    perform bdc_field       using 'BDC_CURSOR'       'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'       '/00'.
    perform bdc_field       using 'LFM1-WAERS'       W_UPLOAD-WAERS.
    perform bdc_dynpro      using 'SAPMF02K'         '0320'.
    perform bdc_field       using 'BDC_CURSOR'       'RF02K-LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'       '=ENTR'.
    perform bdc_dynpro      using 'SAPLSPO1'         '0300'.
    perform bdc_field       using 'BDC_OKCODE'       '=YES'.
    *Transfer data to the session
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
       TCODE                  = 'MK01'
      TABLES
        dynprotab              = T_BDCDATA.
    ENDLOOP.
    *To close the session
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    ENDFORM.                    " SUB_POPULATE_BDC
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR W_BDCDATA.
      W_BDCDATA-PROGRAM  = PROGRAM.
      W_BDCDATA-DYNPRO   = DYNPRO.
      W_BDCDATA-DYNBEGIN = 'X'.
      APPEND W_BDCDATA TO T_BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
        CLEAR W_BDCDATA.
        W_BDCDATA-FNAM = FNAM.
        W_BDCDATA-FVAL = FVAL.
        APPEND W_BDCDATA TO T_BDCDATA.
    ENDFORM.
    *&      Form  SUB_ERROR_RECORD
         This subroutine is used to process the error records
             in to a file T_ERRORS
    FORM SUB_ERROR_RECORD .
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = 'C:\MAMA_ERRORS.TXT'
       WRITE_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                        = T_ERRORS.
    ENDFORM.                    " SUB_ERROR_RECORD
    Hope the Explonation and information I had provided will resolve your issue.
    Reward points if information is very Helpful.
    Have a great day!
    Regards,
    Krishna Chaitanya
    Edited by: Krishna Chaitanya on Apr 7, 2008 4:59 AM

  • Doubt : What is the Exact use of Product/SWCV in an integration process?

    Hi XI Gurus,
    The XI Documentation(Regarding SWCV) says "All design work is organised By SWCV.This makes sense, as interface logically belongs to a Software component Version"
    DOUBT 1 :
    What is the Exact Use/Role of Product/SWCV in an integration process? - Is it ONLY for DOCUMENTATION purpose? ie., to just understand the underlying Software used ? OR DOES it have a Technical say in the way the Business System behaves ?.
    DOUBT 2 :
    What will happen if I create a junk Product(I mean something Meaningless), a junk SWCV BUT while creating a Technical System(I choose Type as WEB AS) BASED on the Junk Product/SWCV ,I give VALID hostname etc...I then create a Business System with data valid data .
    Now i have created a TS & BS with Valid HOSTNAME & CLIENT etc. BUT based on the junk Product/Junk SWCV.
    NOW in integration dir.,will i be able to configure this Business System as Service for Sending IDOCS/FILE(or anything for that matter)?
    If It will work then That means The product/SWCV IS ONLY for documentation purpose.Please rply in detail !
    DOUBT 3:
    When I import the junk SWCV INTO the IntegrationRepository
    & choose import of RFC/IDCOC & give valid connection details to a SAP System , Will it import the RFC Regardless of the Junk SWCV I am using ??
    DOUBT 4 :
    Business System A(Sender) : SAP R/3(For Example)
    Business System B(Receiver) : APO (For Example)
    ASSUMPTION : Business system A & B have DIFFERENT SWCV.
    Now Which Business System's SWCV do I import in my Integration Repository ?The Sender's or Reciever's ?
    and Why ??
    It would be great if anyone can help me out.
    Thanks,
    Arun

    hi arun..
    >>>>>DOUBT 3:
    When I import the junk SWCV INTO the IntegrationRepository
    & choose import of RFC/IDCOC & give valid connection details to a SAP System , Will it import the RFC Regardless
    yes....
    >>>>DOUBT 4 :
    Business System A(Sender) : SAP R/3(For Example)
    Business System B(Receiver) : APO (For Example)
    ASSUMPTION : Business system A & B have DIFFERENT SWCV.
    Now Which Business System's SWCV do I import in my Integration Repository ?The Sender's or Reciever's ?
    and Why ??
    ...generally, u import only ofr Sender business system cos tht is the system wher u have defined all the objects for the scenario...
    and integration process for Receiver is defined..
    >>>DOUBT 1 :
    What is the Exact Use/Role of Product/SWCV in an integration process? - Is it ONLY for DOCUMENTATION purpose? ie., to just understand the underlying Software used ? OR DOES it have a Technical say in the way the Business System behaves
    the product defines the name genaerllly, the SWCV definesd within the product...there can be many SWC in an product...so an SWC is the smallest component in an product...
    >>>>>DOUBT 2 :
    What will happen if I create a junk Product(I mean something Meaningless), a junk SWCV BUT while creating a Technical System(I choose Type as WEB AS) BASED on the Junk Product/SWCV ,I give VALID hostname etc...I then create a Business System with data valid data .
    Now i have created a TS & BS with Valid HOSTNAME & CLIENT etc. BUT based on the junk Product/Junk SWCV.
    NOW in integration dir.,will i be able to configure this Business System as Service for Sending IDOCS/FILE(or anything for that matter)?
    If It will work then..
    ...YOU WILL BE ABLE TO.....
    REGARDS...
    hope it helps...
    vishal

  • What is the exact definition of PO status "Changes transmitted" ?

    Hi'
    Can any one tel me what is the exact definition of PO status "Changes transmitted" ?
    We are using a SRM05 system.
    Thanks.

    Hi Yaron,
    Changes transmitted status u2013 is related to POs for which the output is generated and processed (sent to vendor).
    BBP_PO_ACTION_DEF> BBP_PD_PO> Go to action definition -->
    Processing time -->
    *_u2018Processing using Selection reportu2019_* -- Output is generated but not
    processed manually we have to process it.
    How to process the PO output manually?
    Goto bbp_ppf / 'Issue Purchase Order' --> Enter PO number in
    "Application Key" field --> remove the "Time frame" -->
    Process the output (click on 'Output' Push button)
    Processing when saving document --> Output is generated when you
    ORDER the PO.
    Please check the output definition maintained in your system. Also you can check this by processing the PO output manually. Once the PO output
    is processed successfully, the PO will appear in "Changes Transmitted" status search result.
    Hope this information would clarify your query.
    Regards,
    Amudha R V

Maybe you are looking for

  • Upgrade from 10.1.0.5 to 10.2.0.3 in RAC system / What about ASM ?

    Hi, I have trouble finding this information but answer may be simple. We have customers running 10gR1 and we would like to upgrade them to 10gR2 (10.1.0.5 -> 10.2.0.3) These are cluster configurations with ASM. I've found interesting documents about

  • How to change IP address permanently on Solaris 10

    Hi Solaris Experts, I would like to update an IP address permanently but believes ifconfig only does it on the fly and will revert back once the Solaris 10 Sun Fire server is rebooted: ( i ) # uname -a SunOS angel 5.10 Generic_139556-08 i86pc i386 i8

  • Can I use my iPad 3 in Chile with 4g or 3g?

    I am about to buy an iPad 3 in Australia but to use it mainly in Chile. I need to know if the 4g works there or not. Or if it works as 3g? Also what do I have to know about AT&T and Verizone? I have to choose one of those??? thanks, í

  • Got error 101 after PS CS6 download

    downloaded PS CS6 and got error 101 now what?

  • Removing blackberry desktop software

    I recently started working at a new company, and the previous user had installed the blackberry desktop software.  Unfortunatly i dont have a use for it so would like to remove it,  I followed the instructions from http://www.blackberryforums.com/rim