Skip to Content
author's profile photo Former Member
Former Member

problem in ZF13 and ZF3A

hi gurus,

there is a problem in bkpf-belnr field.

while the user is entering the document number for 1 entry the program is executing correctly.

while the enduser is entering for multiple selections from highest number to lowest number,here first number is displayed is the smallest and then the highest values is displayed.

but if we are selecting highest number also it is picking up from lowest number.

but here user wants what ever he has selected.

pls give me an interim solution.

urs

pradeep.r

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 18, 2006 at 12:51 PM

    Hi Pradeep,

    Can you show us how you are writing your select statement?

    Regards,

    ravi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      SELECT * FROM bkpf APPENDING CORRESPONDING FIELDS OF TABLE it_bkpf

      WHERE bukrs IN so_bukrs

      AND gjahr IN so_gjahr

      AND belnr IN so_belnr.

      *Checking for reccuring documents,if any . If so then deleting those

      *documents.

      LOOP AT it_bkpf.

      IF it_bkpf-belnr BETWEEN c_rec_min AND c_rec_max. "#EC PORTABLE

      DELETE it_bkpf.

      ENDIF.

      ENDLOOP.

      CLEAR it_bkpf.

      ENDFORM. " F001-FETCH_HEADER_INFO

      &----


      *& Form F002-FETCH_ITEM_INFO

      &----


      • text

      ----


      • --> p1 text

      • <-- p2 text

      ----


      FORM f002-fetch_item_info.

      LOOP AT it_bkpf.

      CASE it_bkpf-bstat.

      WHEN 'V'.

      *Park document funda FOR CUSTOMER.

      SELECT bukrs

      belnr

      gjahr

      buzei

      shkzg

      dmbtr

      kunnr

      bschl

      gsber

      rebzg

      rebzj

      rebzz

      zuonr

      hkont

      wrbtr

      valut

      sgtxt

      xref1

      xref2

      xref3

      FROM vbsegd APPENDING CORRESPONDING FIELDS OF

      TABLE it_item WHERE ausbk EQ it_bkpf-ausbk

      AND bukrs EQ it_bkpf-bukrs

      AND belnr EQ it_bkpf-belnr

      AND gjahr EQ it_bkpf-gjahr.

      *Park document funda for vendor.

      SELECT bukrs

      belnr

      gjahr

      buzei

      shkzg

      dmbtr

      lifnr

      bschl

      gsber

      rebzg

      rebzj

      rebzz

      zuonr

      hkont

      valut

      qsshb

      qsskz

      wrbtr

      sgtxt

      xref1

      xref2

      xref3

      FROM vbsegk APPENDING CORRESPONDING FIELDS OF

      TABLE it_item WHERE ausbk EQ it_bkpf-ausbk

      AND bukrs EQ it_bkpf-bukrs

      AND belnr EQ it_bkpf-belnr

      AND gjahr EQ it_bkpf-gjahr.

      *Select funda for

      SELECT bukrs

      belnr

      gjahr

      buzei

      shkzg

      dmbtr

      koart

      saknr

      bschl

      kostl

      gsber

      anln1

      zuonr

      wrbtr

      valut

      sgtxt

      xref1

      xref2

      xref3

      FROM vbsegs APPENDING CORRESPONDING FIELDS OF

      TABLE it_item WHERE ausbk EQ it_bkpf-ausbk

      AND bukrs EQ it_bkpf-bukrs

      AND belnr EQ it_bkpf-belnr

      AND gjahr EQ it_bkpf-gjahr.

      *Select funda for assets.

      SELECT bukrs

      belnr

      gjahr

      buzei

      shkzg

      dmbtr

      bschl

      hkont

      wrbtr

      kostl

      anln1

      zuonr

      sgtxt

      FROM vbsega APPENDING CORRESPONDING FIELDS OF

      TABLE it_item WHERE ausbk EQ it_bkpf-ausbk

      AND bukrs EQ it_bkpf-bukrs

      AND belnr EQ it_bkpf-belnr

      AND gjahr EQ it_bkpf-gjahr.

      WHEN OTHERS.

      *Normal Document Funda.

      SELECT bukrs

      belnr

      gjahr

      buzei

      shkzg

      dmbtr

      koart

      saknr

      kunnr

      lifnr

      bschl

      kostl

      gsber

      rebzg

      rebzj

      anln1

      rebzz

      qsshb

      qsskz

      wrbtr

      zuonr

      valut

      hkont

      sgtxt

      xref1

      xref2

      xref3

      AUFNR

      FROM bseg APPENDING CORRESPONDING FIELDS OF

      TABLE it_item WHERE bukrs EQ it_bkpf-bukrs

      AND belnr EQ it_bkpf-belnr

      AND gjahr EQ it_bkpf-gjahr.

      ENDCASE.

      ENDLOOP.

      ENDFORM. " F002-FETCH_ITEM_INFO

      &----


      *& Form F003-FETCH_TEXT

      &----


      • text

      ----


      • --> p1 text

      • <-- p2 text

      ----


      FORM f003-fetch_text.

      LOOP AT it_bkpf.

      *Getting the text for Document type.

      SELECT SINGLE ltext INTO it_bkpf-ltext FROM t003t

      WHERE spras EQ sy-langu

      AND blart = it_bkpf-blart.

      TRANSLATE it_bkpf-ltext TO UPPER CASE. "#EC SYNTCHAR

      *Feeding status value to the Accounting documents.

      CASE it_bkpf-bstat.

      WHEN 'V'.

      it_bkpf-status = 'PARKED DOCUMENT'.

      WHEN OTHERS.

      IF it_bkpf-stblg GT it_bkpf-belnr. "#EC PORTABLE

      it_bkpf-status = 'REVERSING DOCUMENT'.

      ENDIF.

      ENDCASE.

      MODIFY it_bkpf TRANSPORTING ltext status.

      ENDLOOP.

      *Copying the account code.

      LOOP AT it_item.

      CASE it_item-koart.

      WHEN 'D'.

      MOVE it_item-kunnr TO it_item-acct.

      SELECT SINGLE name1 INTO it_item-acct_text FROM kna1

      WHERE kunnr EQ it_item-kunnr.

      WHEN 'K'.

      MOVE it_item-lifnr TO it_item-acct.

      SELECT SINGLE name1 INTO it_item-acct_text FROM lfa1

      WHERE lifnr EQ it_item-lifnr.

      WHEN 'S'

      OR 'A'.

      MOVE it_item-hkont TO it_item-acct.

      SELECT SINGLE txt50 INTO it_item-acct_text FROM skat

      WHERE spras EQ sy-langu

      AND ktopl EQ 'JSL'

      AND saknr EQ it_item-hkont.

      • WHEN 'A'.

      • MOVE IT_ITEM-ANLN1 TO IT_ITEM-ACCT.

    • MOVE IT_ITEM-HKONT TO IT_ITEM-ACCT.

    • SELECT SINGLE ANLHTXT INTO IT_ITEM-ACCT_TEXT FROM ANLH

    • WHERE BUKRS EQ IT_ITEM-BUKRS

    • AND ANLN1 EQ IT_ITEM-ANLN1.

    • ENDCASE.

      MODIFY it_item TRANSPORTING acct acct_text.

      ENDLOOP.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 05:40 AM

    Hi !

    What you can try is coding an "ODER BY PRIMARY-KEY" to every select that has no explicit ORDER command.

    Implicid order by primary key is not working on every database system !

    So please check that out...

    Regards

    Rainer

    Some points would be nice if that helped a bit.

    Add a comment
    10|10000 characters needed characters exceeded

  • Before answering

    You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
    You must be Logged in to submit an answer.

    Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.