Data is not coming right for few Document nos.

Hi All,
I have a problem in my report that in 10-12 records, data not picking the values against Document Number...means from where i pick the lifnr, there a few records not showing related information...
I tell u in detail..
I pick Document Number from BSIK table, Purchasing Doc. No, with ref. to Document Number...Vendor Code with Purchasing Ref. and Vendor Name with Ref. to Vendor Code...
But in some document we have not maintain Purchasing document no. against Document Number...
So we cann't display Vendor Code and name...
This is the problem...
Now i have a link between Document Number and Vendor Code without Purchasing Document No...in BSEG table...
But what will the condition with my existing query on BSEG...please tell me....
My Code is---
REPORT  zak_form_c4 NO STANDARD PAGE HEADING LINE-SIZE 125  .
TABLES : bsik,bkpf,bseg,j_1imovend,lfa1,t001,t005u,bsak,ekko,bsis, ekkn, anla, anlc.
TYPE-POOLS : slis.
DATA : BEGIN OF itab OCCURS 0,
       belnr LIKE bsik-belnr, "Document number
       buzei LIKE bseg-buzei, "line item
       hkont LIKE bseg-hkont, "Gl account
       mwskz LIKE bseg-mwskz, "Tax Code
       dmbtr LIKE bseg-dmbtr, "Amount
       ebeln LIKE bseg-ebeln, "Purchasing Document
       ebelp LIKE bseg-ebelp, "line item nbr
       hwbas LIKE bseg-hwbas, "Base amount
       shkzg LIKE bseg-shkzg, "Debit/Credit code
       gjahr LIKE bsik-gjahr, "Fiscal Year
       bldat LIKE bsik-bldat, "Document Date
       budat LIKE bsik-budat, "Posting Date
       lifnr LIKE bsik-lifnr, "Vendor number
       xblnr LIKE mkpf-xblnr, "Ven invoice nbr
       name1(25),                                           "name1
       ort01 LIKE lfa1-ort01, "City
       j_1ilstno LIKE j_1imovend-j_1ilstno, " Vendor tin nbr
       regio LIKE lfa1-regio, "Region Code
       bezei LIKE t005u-bezei, "Region desc
       dmbtr1 LIKE bseg-dmbtr, "Amount
       hwbas1 LIKE bseg-hwbas, "Base amount
END OF itab.
DATA:
v_bldat TYPE bldat,
v_budat TYPE budat,
v_lifnr TYPE lifnr,
v_name1 TYPE name1,
v_ebeln TYPE ebeln,
v_mwskz TYPE mwskz,
v_dmbtr TYPE dmbtr,
v_hwbas TYPE hwbas,
v_xblnr TYPE xblnr.
DATA : BEGIN OF itab1 OCCURS 0.
        INCLUDE STRUCTURE itab.
DATA:END OF itab1.
DATA : BEGIN OF itab2 OCCURS 0.
        INCLUDE STRUCTURE itab.
DATA : END OF itab2.
DATA : itab3 LIKE STANDARD TABLE OF itab2 WITH HEADER LINE.
***********************************Purchase order history
DATA:   BEGIN OF bet OCCURS 50.
        INCLUDE STRUCTURE ekbe.
DATA:   END OF bet.
DATA:   BEGIN OF bzt OCCURS 50.
        INCLUDE STRUCTURE ekbz.
DATA:   END OF bzt.
DATA:   BEGIN OF betz OCCURS 50.
        INCLUDE STRUCTURE ekbez.
DATA:   END OF betz.
DATA:   BEGIN OF bets OCCURS 50.
        INCLUDE STRUCTURE ekbes.
DATA:   END OF bets.
DATA:   BEGIN OF xekbnk OCCURS 10.
        INCLUDE STRUCTURE ekbnk.
DATA:   END OF xekbnk.
DATA : w_container TYPE scrfname VALUE 'CL_GRID',
       w_cprog TYPE lvc_s_layo,
       g_repid LIKE sy-repid,
       w_save TYPE c,
       w_exit TYPE c,
       cl_grid TYPE REF TO cl_gui_alv_grid,
       cl_custom_container TYPE REF TO cl_gui_custom_container,
       it_fld_catalog TYPE slis_t_fieldcat_alv,
       wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
       layout TYPE slis_layout_alv,
       col_pos  LIKE sy-cucol ,
       alvfc TYPE slis_t_fieldcat_alv.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS       :  hkont LIKE bseg-hkont OBLIGATORY. "GL Code
*SELECT-OPTIONS   : hkont FOR bseg-hkont .
SELECT-OPTIONS   : belnr FOR bsik-belnr .
SELECT-OPTIONS   : gjahr FOR bsik-gjahr .
SELECT-OPTIONS   : bldat FOR bsik-bldat.
SELECT-OPTIONS   : budat FOR bsik-budat.
SELECTION-SCREEN : END OF BLOCK b1.
PERFORM fill_catalog1 USING:
'HKONT'    'ITAB2'    'G/L Code' ,
'BELNR'    'ITAB2'    'Document Number',
'GJAHR'    'ITAB2'    'Year',
'BLDAT'    'ITAB2'    'Doc. date' ,
'BUDAT'    'ITAB2'    'Posting Date',
'LIFNR'    'ITAB2'    'Vendor',
'NAME1'    'ITAB2'    'Name',
'EBELN'    'ITAB2'    'Purchasing Document',
'MWSKZ'    'ITAB2'    'Tax Code',
'HWBAS'    'ITAB2'    'Base Amount',
'DMBTR'    'ITAB2'    'Tax Amount',
'XBLNR'    'ITAB2'    'Vendor Inv. No.'.
SELECT DISTINCT hkont belnr gjahr bldat budat INTO CORRESPONDING FIELDS OF TABLE itab
                  FROM bsis
                  WHERE bukrs = '1000'
                  AND hkont = hkont
                  AND belnr IN belnr
                  AND gjahr IN gjahr
                  AND bldat IN bldat
                  AND budat IN budat.
SORT itab BY belnr.
LOOP AT itab.
  SELECT * FROM bseg WHERE belnr = itab-belnr AND gjahr = itab-gjahr
                                               AND bukrs = '1000'
                                               AND ( ebeln <> ' ' OR hkont = hkont ).
    IF sy-subrc = 0.
      itab-buzei = bseg-buzei.
      itab-mwskz = bseg-mwskz.
      IF bseg-ebeln <> ' '.
        itab-ebeln = bseg-ebeln.
        itab-ebelp = bseg-ebelp.
        MODIFY itab.
      ENDIF.
      IF bseg-hkont = hkont.
        itab-shkzg = bseg-shkzg.
        itab-hwbas = bseg-hwbas.
        itab-dmbtr = bseg-dmbtr.
        IF itab-shkzg = 'H'.
          itab-dmbtr = itab-dmbtr * ( -1 ).
        ENDIF.
        MOVE-CORRESPONDING itab TO itab2.
        APPEND itab2.
      ENDIF.
    ENDIF.
  ENDSELECT.
ENDLOOP.
LOOP AT itab2.
  SELECT SINGLE * FROM ekko WHERE ebeln = itab2-ebeln.
  IF sy-subrc = 0.
    itab2-lifnr = ekko-lifnr.
  ENDIF.
  CALL FUNCTION 'ME_READ_HISTORY'
    EXPORTING
      ebeln  = itab2-ebeln
      ebelp  = itab2-ebelp
      webre  = 'X'
    TABLES
      xekbe  = bet
      xekbz  = bzt
      xekbes = bets
      xekbez = betz
      xekbnk = xekbnk.
  itab2-xblnr = bet-xblnr.
  SELECT SINGLE * FROM lfa1 WHERE lifnr = itab2-lifnr.
  itab2-name1 = lfa1-name1.
  itab2-ort01 = lfa1-ort01.
  itab2-regio = lfa1-regio.
  SELECT SINGLE * FROM t005u WHERE bland = itab2-regio
                              AND spras = 'EN'
                              AND land1 = 'IN'.
  itab2-bezei = t005u-bezei.
  SELECT SINGLE * FROM  j_1imovend WHERE lifnr = itab2-lifnr.
  IF sy-subrc = 0 .
    itab2-j_1ilstno = j_1imovend-j_1ilstno.  " Vendor tin nbr
  ENDIF.
  MODIFY itab2.
ENDLOOP.
SORT itab2 BY belnr.
LOOP AT itab2.
  v_dmbtr = v_dmbtr + itab2-dmbtr.
  v_hwbas = v_hwbas + itab2-hwbas.
  v_bldat = itab2-bldat.
  v_budat = itab2-budat.
  v_lifnr = itab2-lifnr.
  v_name1 = itab2-name1.
  v_ebeln = itab2-ebeln.
  v_mwskz = itab2-mwskz.
  v_xblnr = itab2-xblnr.
  AT END OF belnr.
    itab2-bldat = v_bldat.
    itab2-budat = v_budat.
    itab2-lifnr = v_lifnr.
    itab2-name1 = v_name1.
    itab2-ebeln = v_ebeln.
    itab2-mwskz = v_mwskz.
    itab2-dmbtr = v_dmbtr.
    itab2-hwbas = v_hwbas.
    itab2-xblnr = v_xblnr.
    APPEND itab2 TO itab3.
    CLEAR: itab2, v_dmbtr, v_hwbas, v_bldat, v_budat, v_lifnr, v_name1, v_ebeln, v_mwskz, v_xblnr.
  ENDAT.
ENDLOOP.
layout-zebra = 'X' .
layout-colwidth_optimize(1) = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = 'ZAK_FORM_C4'
    is_layout          = layout
    it_fieldcat        = it_fld_catalog
    i_default          = 'X'
    i_save             = 'A'
  TABLES
    t_outtab           = itab3
  EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*&      Form  FILL_CATALOG1
*       text
*      -->P_FIELDNAME  text
*      -->P_REF_TABLE  text
*      -->P_SCRTEXT    text
FORM fill_catalog1  USING   p_fieldname TYPE any
                            p_ref_table TYPE any
                            p_scrtext   TYPE any.
  CLEAR : wa_fld_catalog.
  wa_fld_catalog-fieldname  = p_fieldname.
  wa_fld_catalog-tabname    = p_ref_table.
  wa_fld_catalog-seltext_s  = p_scrtext.
  wa_fld_catalog-seltext_m  = p_scrtext.
  wa_fld_catalog-seltext_l  = p_scrtext.
*  wa_fld_catalog-datatype = 'CURR'.
  wa_fld_catalog-outputlen = 20.
  APPEND wa_fld_catalog TO it_fld_catalog.
ENDFORM.                    " fill_catalog1.
Plz help....
Edited by: Prince Kumar on Jan 16, 2009 12:29 PM
Edited by: Vijay Babu Dudla on Jan 16, 2009 4:27 AM

Hi Dear,
Thanks for reply....
I use this code, in the LOOP AT ITAB...
      IF bseg-ebeln = ' ' AND bseg-KOART eq 'K' .
        itab-lifnr = bseg-lifnr.
      ENDIF.
But, not working....means its not displaying Vendor name against Document Number in BSEG.
Plz let me know...How...where i can change,,,

Similar Messages

  • Problem in report of cats_da data is not coming for one absence type.

    Dear experts,
    For one absence type the data is not coming in the report cats_da. When I check the other absence type the report is showing the data. I dont know where is the problem. Customer is entering data throught PA30  transaction. Kindly help me where is the problem in customization.

    No answers so closed.

  • PNG: Could not complete your request...not the right kind of document

    Suddenly, I am unable to open any PNG files or even "Save as" png with Photoshop.  I can't open test tiff files and save as png through "save for web."
    But when I try to open those test files, I get this error message "Could not complete your request because it is not the right kind of document."
    I was able to open them yesterday.
    I thought my plugin might be corrupt, so I downloaded and added a new one. Tried to drop it in File Formats. No work. Then into Adobe Photoshop Only > File Formats folders. Also didn't work.
    Maybe I need to change preferences?
    Any suggestions or pointers to documentation for a fix? I need to use PNG.
    I hope to upgrade to CS4 this summer, but right now, I'm still using CS.

    My OS is 10.4.11. on 2 GHz Intel iMac.
    I reread my orignial post and noticed a typo. I can save png's with PS "save for the web," but can't open those just-saved png files.
    I did lots of things before I noticed that the png wasn't working. Don't know which may have caused a problem. Likely things? Well, I added a plugin for Ico. format. I deleted it because I thought it might have caused the conflict.
    Assuming that was the problem, what can I do to restore the png file format?
    I don't have disk warrior. I did run the maintenance utility yesterday. It runs crons, clears caches, deletes cookies, that kind of stuff.
    I've never had a problem with it disabling plugins or causing any problems. Haven't run disk utility for a few weeks. Would that help?
    I didn't download the replace png plugin from Adobe, but the original wasn't working anyway. I looked for a backup on the exernal drive, didn't find one, and downloaded another.
    Next, I did a Photoshop reinstall thinking that might fix the problem, but it didn't.  Which plugin folder should the png plugin be place in. I've never been sure why there are two format folders;  the folder in plugins, and the folder in Photoshop only.

  • Data is not coming in internal table

    Hello Abapers,
    Data is not coming in my internal table.
    Plz tell me where I m wrong
    SELECTION-SCREEN BEGIN OF  BLOCK blk.
    PARAMETERS:       compcode LIKE vbrk-bukrs OBLIGATORY.
    PARAMETERS:       billtype LIKE vbrk-fkart OBLIGATORY.
    SELECT-OPTIONS:   billdate FOR  vbrk-fkdat OBLIGATORY.
    PARAMETERS :      acgrpc   LIKE vbrk-ktgrd OBLIGATORY.
    PARAMETERS:       acgrpm   LIKE vbrp-ktgrm OBLIGATORY.
    PARAMETERS:       taxcode  LIKE konv-mwsk1 OBLIGATORY.
    SELECT-OPTIONS:   plant FOR vbrp-werks .
    SELECT-OPTIONS:   bussarea FOR vbrp-gsber .
    SELECTION-SCREEN END OF BLOCK blk.
    START-OF-SELECTION.
    SELECT avbeln afkart aknumv afkdat abelnr aktgrd abukrs axblnr
    amwsbk  bgsber bwerks bktgrm
    FROM ( vbrk AS a INNER JOIN vbrp AS b ON
    avbeln EQ bvbeln  )
    INTO CORRESPONDING FIELDS OF TABLE vbrk_vbrp
    WHERE ( a~fkart EQ billtype )  AND
    ( a~fkdat IN billdate ) AND
    ( a~ktgrd EQ acgrpc ) AND
    ( a~bukrs EQ compcode ) AND
    ( b~gsber EQ bussarea ) and
    ( b~werks EQ plant ) AND
    ( b~ktgrm EQ acgrpm ) .
    Ravi

    Hi,
    write ur query this way :
    SELECT avbeln afkart aknumv afkdat abelnr aktgrd abukrs axblnr amwsbk bgsber bwerks bktgrm
    FROM ( vbrk AS a INNER JOIN vbrp AS b ON
    avbeln EQ bvbeln )
    INTO CORRESPONDING FIELDS OF TABLE vbrk_vbrp
    WHERE ( a~fkart EQ billtype ) AND
    ( a~fkdat IN billdate ) AND
    ( a~ktgrd EQ acgrpc ) AND
    ( a~bukrs EQ compcode ) AND
    ( b~gsber IN bussarea ) and
    ( b~werks IN plant ) AND
    ( b~ktgrm EQ acgrpm ) .
    even plz check then internal table ' vbrk_vbrp ' if they have all the fields of select query and even the order is same as select , since you are using ' into corresponding fields of table ' clause in select statement.
    hope this helps.
    thanx,
    dhanashri.
    Edited by: Dhanashri Pawar on Aug 26, 2008 6:14 AM

  • Nav.attr data is not coming in cube

    Hi guys,
            Nav.attr data is not coming in cube even though there is data in master data tables.

    Hi Ajay,
    In your case for the Nav Attr data to appear firstly load the master data where your Nav Attr resides and then do the apply hier/attr change for that master data.
    Hope this helps.
    Bye
    Dinesh

  • Delivery date is not coming properly in PO Printout

    Hi,
    I have a problem in PO Printout that Delivery date is not coming properlyu2026In my PO, there are 5 line items. 
    If the Delivery date of all line items are same like 01.04.2009, then Delivery date should be shown 01.04.2009 in PO printout.. IT IS COMING RIGHT.
    But if the Delivery Date of all line items are different like 01.04.2009, 02.04.2009, 03.04.2009, 04.04.2009 and 05.04.2009. Then Delivery Date should be shown with the each line items in PO print out. THIS IS NOT SHOWING IN MY PO PRINT OUT.
    Please tell me what is the problem. Why not coming Delivery date with each line items???
    Regardsu2026

    currently i dont have SAP installed with this system, so i just suggesting you some thing.
    goto tcode: nace.
    select your output type. check the processing routines. check the smartform and processing routines attached to it. and see how the field is getting populated and what fields are being passed there.

  • Could not complete your request because it is not the right kind of document.

    This problem has been re-occuring for a day now, and I honestly have no clue why, I followed the directions. I updated my camera raw plugin, and photoshop to the lastest version. I am trying to open an avi file but it won't open it. About 4 seconds long. Usually I could but yesterday when I tried opening it, it says "Could not complete your request because it is not the right kind of document." Any suggestions because I'm trying to make gifs but I can't because photoshop won't let me open the avi. file.

    Thanks, but I have a 64-bit pc, I do have photoshop cs5 64 and 32 bit but it's only avaiblable for 32 bit, i'll use it for now but if anyone has a solution for 64 bit photoshop it'd be great.

  • I cant updated Camera Raw to accommodate my Canon 550D Raw images on CS4 - its saying "Could not complete your request because it is not the right kind of document" HELP!!!

    Ive tried downloading the latest version but then always brings up CS4 and says not the right kind of document...? ive tried going to Updstes in help and says all updated but I have version 5.0.0.178 of Camera Raw

    Adobe Camera Raw did not support the Canon 550D until version 6.1 for Photoshop CS5.
    The best way if you do not wish to upgrade is to download the 8.7 DNG converter and convert your Canon 550d raw files to dng so that Photoshop CS4 can open them in your version of Camera Raw.
    Where to get the DNG converter:
    Camera Raw 8.7 and DNG Converter 8.7 Now available
    How to:
    Camera Raw: How to use Adobe DNG Converter - YouTube
    Gene

  • "Could not complete your request because it is not the right kind of document" Why not?

    When I attempt to open a Canon .CR2 image in CS3, I get the following error: "Could not complete your request because it is not the right kind of document" What is the source for this problem?

    What camera do you have?
    Before you resign yourself to using the free DNG converter, which adds a step to the process each time you want to open raw files, you might want to double check to see if you have installed the latest Camera Raw update, and whether that version actually handles your camera.
    Check your version by choosing Help - About Plug-in... - Camera Raw in Photoshop.  4.6 is the latest for Photoshop CS3.
    Check the list of supported cameras in the ReadMe file for Camera Raw 4.6 (the latest version that will install with Photoshop CS3) here:
    http://www.adobe.com/special/photoshop/camera_raw/Camera_Raw_4.6_ReadMe.pdf
    At the root of all this is that every different camera makes a slightly different format .cr2 file, even though they're all named .cr2.  If your camera was designed/released after the last update of Camera Raw for CS3 was made (i.e., when PS CS4 was first released), then it will not be supported by that version of Camera Raw.  Adobe stops adding new camera support to each version of Photoshop when the next major release goes out.  If you find yourself in this situation, then the DNG converter, as Silkrooster has said, is what you'll want to use.
    -Noel

  • Worked LAST NIGHT, now: Could not complete your request because it is not the right kind of document

    Did work 12 hours ago... did NOT update anything.
    Now when I navigate via bridge i get no previews (filmstrip / essentials views) and when I open I get: Could not complete your request because it is not the right kind of document
    LITERALLY 12 hours ago was when I was working on this. Tried back ups, same things... this is two big dance studios and a wedding that are at risk! Please help!
    Running latest versions of CAMERA RAW, CS6 (both = no updates avialabale)

    Please provide us with a lot more information so that somene can help you.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Date format not coming proper after formula

    Hi All,
    I have two time characteristics "Goods Issue date" and "Goods Return date" and One key figure "No. of days elapsed".
    The key figure "number of days elapsed" is being calculated by taking difference of "goods issue date" from "goods return date", but the format for that is not coming proper for example:-
    Goods Issue Date is 21.06.2006
    Goods Return Date is 22.08.2006
    According to formula No. of days elapsed shud be 62
    but it is coming as 04.03.0001.
    Please help as it is a urgent requirement.
    Much Appreciated,
    Sunil Morwal.

    HI,
    Change the data type to number and try it out.
    i think i will solve your problem.
    Cheers,
    viren.

  • "not the right kind of document" -- eps & ps

    This seems to be quite an issue with photoshop, as I see.
    The weird thing is that Photoshop CS2 could open EPS and PS files, which was handy for generating hi-res tiff from InDesign layouts. Now suddenly it cannot open neither postscript file — and reads "Could not complete your request because it is not the right kind of document".
    I re-installed the Photoshop from the CreativeSuite CD; I also tried to apply the steps from here http://kb2.adobe.com/cps/329/329945.html , however the only relevant "solution" was to recreate the preferences file, which hasn't helped either.
    Any clues? Thanks in advance.
    System: Win XP, SP3 / Adobe CS 2 Premium with updates / 3Gb RAM

    As Chris Cox points out, PS wants, and needs, to see things in certain locations. Attempts at "housekeeping" can have catastrophic results.
    The same thing with many 3rd party plug-ins. Many require that you "install," while some just require that you copy the plug-in over to a particular folder. You need to follow the instructions closely, and comply.
    Unlike Premiere surveying one's system for all .VST's, PS likes things a certain way with regards to plug-ins.
    Good luck,
    Hunt

  • Getting message: Cannot complete your request because it's not the right type of document

    I am taking a CS6 Photoshop class, I downloaded the data files from cengagebrain.com, my task in the book is to click File on the Menu bar, then click Open, then navigate to the drive and folder where you store you Data Files.  When I click the corresponding file (PS 1-1.psd), I get the following error message: Cannot complete your request because it's not the right type of document.
    Can anyone help please?

    Good day!
    Cannot complete your request because it's not the right type of document.
    Are you sure the file has the correct suffix?
    It might have been damaged in downloading, unstuffing, copying …, so if you are certain that the site is legit you may want to try re-downloading the file.
    Regards,
    Pfaffenbichler

  • FAGLL03-GRN number without extension of item number for few documents in Le

    In GR/IR account 31901 and 31903, Ref. Key 3 field has shows the year & GRN number without extension of item number for few documents in Ledger view(FAGLL03).  But, if we go through the entries for the same in document display, it will shows with extension numbers, due to this reason auto clearing is not happening for these documents through F.13. Please help.

    PO number at the item level of sc or at the header level of the sc next to description
    Such requirement is going to be difficult to achieve because not only one SC could yield multiple POs, but one SC item could potentially have multiple follow on POs. It's not always a 1:1 relation that can simply be presented in a table row. That is one of the main reasons one separated tab is dedicated to follow-on document.

  • FAGLL03-GRN number without extension of item number for few documents

    In GR/IR account 31901 and 31903, Ref. Key 3 field has shows the year & GRN number without extension of item number for few documents in Ledger view(FAGLL03). But, if we go through the entries for the same in document display, it will shows with extension numbers, due to this reason auto clearing is not happening for these documents through F.13. Please help.

    Hi Dear,
    Thanks for reply....
    I use this code, in the LOOP AT ITAB...
          IF bseg-ebeln = ' ' AND bseg-KOART eq 'K' .
            itab-lifnr = bseg-lifnr.
          ENDIF.
    But, not working....means its not displaying Vendor name against Document Number in BSEG.
    Plz let me know...How...where i can change,,,

Maybe you are looking for