After calling FM, how to ensure no redundancy

Hi all again,
If some of you recall my earlier thread on the READ_TEXT FM, i have managed to successfully retrieve the PO texts, thanks to you all...
However, i just realized that it works perfectly fine when i test it using 1 example (lets say i pur 1 item number, MATNR) as my selection criteria. However, when i tried it with 2 or more, it still works as the PO Text for all the material numbers appear but they keep on repeating.
As an example, i choose to query 2 material numbers. The first material number will display the PO text for both the first and second material number and it is also the same for the second material number.
Any hints?
I tried doing a CHECK, ON CHANGE OF and even IF...ENDIF, then REFRESH and CLEAR statements to ensure that each material number will display their own respective PO Text instead of all that was queried but still no changes as each material number is displaying all the PO Text instead of their own.
*&    FORM WRITE_DATA                                                  *
FORM WRITE_DATA.
  LOOP AT ITAB.
  IF SY-LINNO >= 65.
    NEW-PAGE.
    PERFORM WRITE_HEADER.
  ENDIF.
*--> ALTERNATE COLORS FOR EACH LINE OF OUTPUT
  IF LINE_CHECK = 0.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    LINE_CHECK = 1.
  ELSE.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    LINE_CHECK = 0.
  ENDIF.
    CLEAR V_PRICE.
    COMPUTE V_PRICE = ( ITAB-NETPR / ITAB-PEINH ).
    NEW-LINE.
    WRITE:   1 '|',   2 ITAB-MATNR,              "MATERIAL CODE
            15 '|',  16 ITAB-MATKL,              "MATERIAL GROUP
            30 '|',  31(40) ITAB-MAKTX,          "DESCRIPTION
            71 '|', " 71 ITAB-MTEXT,             "MATERIAL PO TEXT
           110 '|', " 111 ITAB-PTEXT,            "ITEM TEXT
           150 '|', 157 ITAB-MENGE,              "PURCHASE QUANTITY
           173 '|', 177 V_PRICE DECIMALS 2,      "PURCHASE PRICE
           193 '|', 198 ITAB-BEDAT,              "PURCHASE DATE
           212 '|', 213 ITAB-NAME1,              "PURCHASE VENDOR
           255 '|'.
  PERFORM READ_TXT.
  ENDLOOP.
  WRITE: SY-ULINE.
ENDFORM.
*&    FORM READ_TXT                                                    *
FORM READ_TXT.
DATA: L_NAME LIKE THEAD-TDNAME,
      COUNT TYPE I.
LOOP AT ITAB.
  CLEAR: MAT_TXT, MAT_TXT[].
  L_NAME = ITAB-MATNR.
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      CLIENT                  = SY-MANDT
      ID                      = 'BEST'
      NAME                    = L_NAME
      OBJECT                  = 'MATERIAL'
      LANGUAGE                = SY-LANGU
    TABLES
      LINES                   = MAT_TXT
    EXCEPTIONS
      ID                      = 1
      LANGUAGE                = 2
      NAME                    = 3
      NOT_FOUND               = 4
      OBJECT                  = 5
      REFERENCE_CHECK         = 6
      WRONG_ACCESS_TO_ARCHIVE = 7
      OTHERS                  = 8.
  LOOP AT MAT_TXT.
    MOVE: ITAB-MATNR TO MTXT_TAB-MATNR,
          SY-TABIX TO MTXT_TAB-POSNR,
          MAT_TXT-TDLINE TO MTXT_TAB-LINE.
    APPEND MTXT_TAB.
    WRITE:/72(40) MTXT_TAB-LINE.
  ENDLOOP.
ENDLOOP.
ENDFORM.

Oopsy...zhenglin..i guess you were right...i thought that i would only need to do a CONCATENATE ITAB-EBELN ITAB-EBELP into ITAB-PTEXT to find out the Item Text. Then i realized that 1 material number (MATNR) could belong to many POs. Have a look at my earlier SELECT statement:
*&    FORM SELECT_DATA                                                 *
FORM SELECT_DATA.
  SELECT A~MATNR A~MATKL B~MAKTX A~MTART A~EXTWG C~WERKS
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM MARA AS A
      INNER JOIN MAKT AS B
        ON A~MATNR = B~MATNR AND
           B~SPRAS = 'EN'
      INNER JOIN MARD AS C
        ON A~MATNR = C~MATNR
    WHERE A~MATNR IN I_MATNR AND
          A~MATKL IN I_MATKL AND
          A~MTART IN I_MTART AND
          A~EXTWG IN I_EXTWG AND
          C~WERKS = I_WERKS.
  SORT ITAB BY MATNR MATKL MTART EXTWG WERKS MAKTX.
  CHECK NOT ITAB[] IS INITIAL.
  SELECT A~MATNR A~MATKL A~WERKS MAX( A~EBELN ) MAX( A~EBELP ) A~BUKRS
A~MENGE A~NETPR A~PEINH A~MTART B~LIFNR B~BEDAT C~NAME1
  INTO TABLE WTAB
    FROM EKPO AS A
      INNER JOIN EKKO AS B
        ON A~EBELN = B~EBELN AND
           A~BUKRS = B~BUKRS AND
           B~BSTYP = 'F'
      INNER JOIN LFA1 AS C
        ON B~LIFNR = C~LIFNR
    WHERE A~MATNR IN I_MATNR AND
          A~MATKL IN I_MATKL AND
          A~WERKS = I_WERKS AND
          A~BUKRS = I_BUKRS AND
          A~MTART IN I_MTART AND
          A~LOEKZ = ' '
    GROUP BY A~MATNR A~MATKL A~WERKS A~EBELN A~EBELP A~BUKRS A~MENGE
A~NETPR A~PEINH A~MTART B~LIFNR B~BEDAT C~NAME1.
  SORT WTAB BY MATNR MATKL MTART WERKS EBELN EBELP MENGE NETPR PEINH
LIFNR BEDAT NAME1.
  LOOP AT WTAB.
    MOVE: WTAB-EBELN TO ITAB-EBELN,
          WTAB-EBELP TO ITAB-EBELP,
          WTAB-BUKRS TO ITAB-BUKRS,
          WTAB-MENGE TO ITAB-MENGE,
          WTAB-NETPR TO ITAB-NETPR,
          WTAB-PEINH TO ITAB-PEINH,
*          WTAB-MTART TO ITAB-MTART,
          WTAB-LIFNR TO ITAB-LIFNR,
          WTAB-BEDAT TO ITAB-BEDAT,
          WTAB-NAME1 TO ITAB-NAME1.
    MODIFY ITAB TRANSPORTING EBELN EBELP BUKRS MENGE NETPR PEINH LIFNR
BEDAT NAME1
      WHERE MATNR = WTAB-MATNR.
  ENDLOOP.
  SORT ITAB BY MATNR MATKL MTART.
  DELETE ADJACENT DUPLICATES FROM ITAB COMPARING ALL FIELDS.
  LINE_CHECK = 0.
ENDFORM.
If you notice, i did a MAX syntax when selecting the EBELN (PO Number) and EBELP (Item Number). So, for the Item Text, i would need to display the data from those 2 fields and CONCATENATE them. Any ideas on how i could ensure that the right PO Number and PO Number (which is the MAX) is selected? I'm considering using the READ_TEXT FM again...

Similar Messages

  • After updating to iOS 7 the contact photos no longer appear when I receive a call. How can I get them to show again?

    After updating to iOS 7 the contact photos no longer appear when I receive a call. How can I get them to show again?

    I'm having the identical problem on my iPhone 4 after upgrading to IOS 7--no ability to update apps or download new apps.  Here is what Apple tech support emailed to me:
    I understand that you are unable to download or update applications after updating iOS7 on your iTunes. I know you must be eager to get this resolved and I will be happy to help you today.
    ... to help you better with this issue I would request you to please try this steps given below to resolve your issue.
    Please follow this steps:
    1) Double tap the home button
    2) Hold down on an icon
    3) Tap the red "X" on iTunes, and the App Store.
    4) Tap Settings > Store > Tap your Apple ID, and choose sign out
    5) Tap Settings
    6) Tap General
    7) Tap Reset
    8) Tap Network Settings
    Once it has been closed with multi-tasking, and you have rebooted the device in the network settings reset, please sign in, and try again. 
      Howevr, if you are facing the same issue than for this issue, you may need to call our AppleCare technical support team. A technical Advisor will be able to tell you about Apple's complimentary and fee-based support. The technical Advisor can also assist you in determining what option might be most helpful to you in this case.
    Mildly amusing that the instructions for force-closing a program are the IOS 6 instructions, which do not work on IOS 7. 
    Otherwise I'm having a little success with this.  Some apps (not all) are updating. It seems that a few more apps update each time I go through the process (close everything, sign out, and either reset or reboot, then go to the app store, sign in and try to update all).  So far it has been a very lengthy, iterative process. 

  • HT4623 After updating my iPhone I am unable to make or receive calls. How do I fix this

    After updating my iPhone I am unable to make or receive calls. How do I fix this

    Having this problem too! 5 days without a working fone!!
    I have signal bars,calling credit but it won't let me ring/txt??!!
    Smart fone my arse!!! Didn't have any problems till I did the stupid update! Fuming!!

  • HT4211 My audio apps keep playing in the background after I answer a phone call. How do I turn this off?

    My audio apps keep playing in the background after I answer a phone call. How do I turn this off?

    Hello BobWeaver,
    It sounds like we need to troubleshoot the software on your device as that is not expected behavior.
    I would perform steps 1, 3 and 5 from the iPhone Troubleshooting Assistant found here http://www.apple.com/support/iphone/assistant/phone/. If you get to step 3, then I suggest closing all the apps. Here is step 1 to get you started:
    Restart iPhone
    To restart iPhone, first turn iPhone off by pressing and holding the Sleep/Wake button until a red slider appears. Slide your finger across the slider and iPhone will turn off after a few moments.
    Next, turn iPhone on by pressing and holding the Sleep/Wake button until the Apple logo appears.
    Is iPhone not responding? To reset iPhone, press and hold the Sleep/Wake button and the Home button at the same time for at least 10 seconds, until the Apple logo appears.
    If your device does not turn on or displays a red battery icon, try recharging next.
    Cheers,
    Sterling

  • Oracle 11g: How to ensure the same transaction across several BPEL calls?

    How to ensure transaction semantics across invocations of several BPEL services with a Database operations (Insert, update)? We are using transaction REQUIRED property in all of our BPELs. We are using webserive and JCA to access and modify the same row. Our code uses a combination of JCA, Spring bean, enity services, EJBs in these BPELs. The code can be more efficient, but, at this point, we have no option but to fix the transaction issue in this code. So, our question is how to ensure the same transaction context is used in all these BPELs to inser/update the same row? We have tried to set the GetUnitOfWork in the JCA Adapter but it did not provide any solution. Apaert from setting transaction in BPEL to REQUIRED and the JCA Adapter to use Unit of work, we are out of ideas. Any help is much apprecited. We are using Oracle SOA Suite 11g 11.1.1.5 version. --chary

    Hi,
    I can help you if you can describe the processes.
    There can be some difficulties when you try to use the same transaction especially when you use many DB transactions & BPEL processes.
    Using unit of work only ,might not be enough.
    Thanks
    Arik

  • Indesign CS6 quits during document recovery, even after restart. How do I get out of this cycle?

    Indesign CS6 quits during document recovery, even after restart. How do I get out of this cycle?
    I was saving a document when it originally quit. so "locked" file appeared in directory as well as reg file.
    Upon restart of InDesign, recovery failed and software quit again.
    Restarted computer, then indesign, file opens but as soon as I select "recover" it sends a message that indesign needs to close.
    I cannot seem to get out of this cycle. Help.

    Use your operating system’s Search utility to find a folder called (InDesign Recovery) and delete it.

  • How to ensure copy

    Oracle 10g and OEL
    i am taking coldbackup of datafiles,controlfiles,redologfiles,parameter files.
    after copying
    using
    tar -Pcvf
    make all this files into one file and
    scp to backup server.
    i would like to ensure
    all files are copied during copy process.
    LAST WEEK there is a trouble in copying of two datafiles, so the backup was not complete.
    how to ensure copying of all files during backup?
    can we check the status of copy after every copy command inside shell script.
    santhanam.

    Hi,
    If Cold backup, try MD-5 checksum
    md5sum command generates a 32-bit MD5 hash value of the files.
    Two files with the same checksum can be considered identical.
    - get original file's md5 (#md5sum original_file)
    - scp
    - check the MD5 of copied file has not changed (#md5sum copied_file)
    HTH

  • Can rs.last() be used after calling the stored procedure?

    Can rs.last() be used after calling the stored procedure? If yes what should be the CURSOR types?

    Can rs.last() be used after calling the stored
    procedure? If yes what should be the CURSOR types?That would depend on the driver/database.
    And as I said in your other post it is far more efficient to count records by just returning a count rather than a complete collection regardless of how you get to the end.

  • Audio autoplays when I finish a phone call. How do I disable that?

    Audio autoplays when I finish a phone call. How do I disable that?

    Hello BobWeaver,
    It sounds like we need to troubleshoot the software on your device as that is not expected behavior.
    I would perform steps 1, 3 and 5 from the iPhone Troubleshooting Assistant found here http://www.apple.com/support/iphone/assistant/phone/. If you get to step 3, then I suggest closing all the apps. Here is step 1 to get you started:
    Restart iPhone
    To restart iPhone, first turn iPhone off by pressing and holding the Sleep/Wake button until a red slider appears. Slide your finger across the slider and iPhone will turn off after a few moments.
    Next, turn iPhone on by pressing and holding the Sleep/Wake button until the Apple logo appears.
    Is iPhone not responding? To reset iPhone, press and hold the Sleep/Wake button and the Home button at the same time for at least 10 seconds, until the Apple logo appears.
    If your device does not turn on or displays a red battery icon, try recharging next.
    Cheers,
    Sterling

  • After call summary messages

    Dear Apple Customer Care
    I am using iphone4, guide me how to stop after call summary messages. it is eating up my battery lifte in data

    unfortunately, the only time I can see a call summary is right after the call is completed on a wp device.
    the only thing you can see after that is if you open phone and it will show you if incoming/outgoing/missed, and if you tap on that name or number of the caller, just opens to their contact info, where you can swipe left to see the history, but this is not detailed. tapping on the call, or calls would only start to call them again.

  • Hi I am a new iPad user and would like to know how to ensure I am on wifi at my home instead of my providers network using up time. At the top of my iPad it says my providers name  and shows a signal strenght

    Hi I am a new iPad user and would like to know how to ensure I am using wifi instead of my network provider.  At the top of my screen it is showing my providers name and a signal strength. I have a router at home that I want it to use. I will also be traveling to Italy tomorrow and want to ensure it automatically hooks up to the wifi where we will be staying. Any help would be much appreciated.

    I copied this from another thread. I made the important line bold. Make sure that WiFi is turned on if you want to use WiFi first.
    After successfully connecting to a wireless network, the network and network settings are saved on your iPad. If wi-fi access is on, when returning within range of a wireless network you have successfully connected your iPad with, your iPad will automatically connect to the wireless network, or it should. If 3G access is on, when leaving the range of an available wi-fi network you have access to, it will switch to AT&T's cellular network automatically. If both are on, your iPad should switch between the two automatically and seamlessly. Your iPad will always connect to the fastest wireless connection available at the time as long both options are enabled. Between an available wi-fi network that you have access to and are in range of and AT&T's cellular network, it will or should be the wi-fi network.
    Here is the thread.
    https://discussions.apple.com/thread/2419363?start=0&tstart=0

  • LEM-00031: Error encountered in lempgmh after calling lmserr

    Hi,
    in 8i version on client when I issu RMAN I have :
    LEM-00031: Error encountered in lempgmh after calling lmserr
    Do you have any idea ?
    Thanks.

    Thank you, the OS is Win 2003 server.
    it comes just issuing RMAN:
    D:\oracle\ora81>cd bin
    D:\oracle\ora81\bin>rman
    RMAN-00571: file not found
    LEM-00031: Error encountered in lempgmh after calling lmserr.
    RMAN-00571: file not found
    LEM-00031: Error encountered in lempgmh after calling lmserr.
    RMAN-00571: file not found
    I looked at metalink note 190079.1
    but I have correctly :
    ORACLE_HOME=D:\oracle\ora81
    OS=Windows_NT
    Os2LibPath=C:\WINNT\system32\os2\dll;
    Path=C:\Pro:\BEA\TUXEDO\bin;d:\JAVA\JRE\bin;D:\oracle\ora81\bin
    Thank you.
    In windows server is ther any U limite for users' files ? If yes how to change ?
    Message was edited by:
    user522961

  • 'UnknownHostException: proxy' after calling Webstart with Java 6

    Hello,
    after calling a Java Webstart application with 1.6.0_13, installed (exactly: build 1.6.0_13-b03), I've got an 'UnknownHostException: proxy' (detailed stacktrace see below) at the beginning of the log output. This error log doesn't appear with 1.5.0_16. Nevertheless the webstart application is running on both Java versions (5 and 6); only that error log on Java 6 is strange.
    What may be the reason for this 'UnknownHostException: proxy' log?
    How to avoid this exception even for Java 6?
    Thomas Wiedmann
    Detailed stacktrace:
    java.net.UnknownHostException: proxy
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.getJSFileFromURL(Unknown Source)
         at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source)
         at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
         at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
         at com.sun.javaws.Main.initializeExecutionEnvironment(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    JNLP JREDesc in Component ignored: null

    Have you actually configured a proxy? Could it be something wrong with this config?
    Anyway check your connection settings in the java control panel (you'd may wanna give a look here too).
    Bye.

  • My mother contacts disappear when she sends a message or call someone, how is this possible and how to fix it?

    My mother contacts disappear when she sends a message or call someone, how is this possible and how to fix it?

    Technically the limit of 4Gb per folder should have been removed in a recent patch. Personally I an unconvinced as the developers have said so twice before and something else arose to bite people at 4Gb. So the limit probably does not exist anymore and moving mail and compacting will fix it without data loss if it occurs as recent issues have been about displaying mail after the 4Gb point, not storing it.
    Use the Ctrl and Shift keys in conjunction with your mouse to make multiple selections.
    click followed by Shift+ Click selects everything between the two clicks, including the items clicked.
    Holding the Ctrl key while clicking allows you to select or deselect mail to either fine turn the list from shift clicking or to make one of your own.
    Ctrl +A selects everything in the list from the current selection to the end.
    One option is create an important folder and move your important stuff to it then ctrl +A the whole remaining inbox.

  • I have change my phone language to english. but the phone shows chinese language in the internet pages and with call details. how to change it. why is this occuring?

    i have change my phone language to english. but the phone shows chinese language in the internet pages and with call details. how to change it. why is this occuring?

    If the phone is not unlocked, let's say for example it is locked to another carrier such as at&t, when you put in the Tmobile SIM in, the phone would complain about the SIM.
    Does your phone do that? If yes, then the party that sold you the iPhone4S (if you purchased it from another person) may have not done the unlocking properly, and that may explain why Tmobile is insisting on the phone being locked.
    If you purchased your iPhone4S new from Apple, did you pick Tmobile, or did you choose unlocked?
    If you picked the Tmobile choice, then it should come up ready to use.
    If you picked the unlocked choice, then you would need to visit Tmobile to purchase a nano-SIM and usually they should be more than willing to help you, since you're paying for their service.
    But as you have indicated, this phone is under AppleCare, so if it doesn't work with a supposedly good Tmobile SIM, the quickest way to fix this is to get a replacement phone. When we troubleshoot we always try the least time consuming methods first.
    You may have noticed it, that a good number of unfortunate uses of the iPhone4S have had their wifi become strangely disabled after upgrade to iOS7. Your situation is the reverse, your wifi is useable but not your cellular network.
    In the mean time, you can apply for a Google Voice account (see http://www.google.com/voice), and obtain a free North American telephone number. You can then download one of many free Google Talk applications. Set it up, and you will be able to call and receive phone calls using your wifi. This would be just for the transition period before you get a useable phone.
    Google voice provides average voice quality calls to and from US & Canada numbers for free for 1 hour per call. You can use this as a temporary work around while you are waiting for your replacement phone.
    Cheers!

Maybe you are looking for

  • Quotation status overview Unit Basic Materual determination

    Hello, We employ the technique of the material determination between the copy of a quotation to an order. The alternative articles have all like basic unit PCE and sales unit M2. The conversion ratios are not the same ones for each article. For examp

  • RD Connection Broker randomly fails to process connection requests

    The RD Connection Broker is a Windows 2008 R2 server. It's been running without issues for 3 years. It handles three RD servers also Windows 2008 R2. Starting yesterday some users - not all - no longer can log on using the farm name. If the RDP file

  • Long Audio Delay

    I'm running on Mac 10.7.3 using the latest free trial of Adobe Connect. I'm experiencing very long audio delays (5 seconds or more) when in a meeting room. I've searched the forums and found this   Re: Long audio delay By jonturkle, posted Nov 20, 20

  • Outbound caller ID work around

    We have CM5.CCX 5 Customer is asking if he has 37 markets to outpost the local area market caller id. CM can only outpost 1 DID. Is there any work around for this. He has 37 locations and they now call 800 and connect to call center. He wants his age

  • Digital Voice Recorder

    Hello, I'm looking for a digital voice recorder whose USB connectivity will work with OS X. Olympus seems to pop up a lot in my searches: http://www.olympusamerica.com/cpgsection/cpg_vrdigitalrecorders.asp Sony, too: http://www.sonystyle.com/is-bin/I