Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in PO

Former Member
0 Likes
1,194

Hi,

I have a issue.

The Open PO(Purchase order) comming with the deleted PO But requirement is only open PO should come not deleted PO.

Could any one one help me please

Ananta

Hi,

I have a issue.

The Open PO(Purchase order) comming with the deleted PO But requirement is only open PO should come not deleted PO.

Could any one one help me please

Ananta

8 REPLIES 8
Read only

Former Member
0 Likes
1,149

Hello Ananta

Please could you supply some more details.

How are you getting the Open PO? Using a transaction, report, BAPI etc?

Kind regards

Steve

Read only

0 Likes
1,149

I am getting PO using Report.

Read only

Former Member
0 Likes
1,149

  Hi , PO items table   -  EKPO

  ekpo-loekz is initial   - item not deleted

  ekpo-elikz is initial -  item is open

Read only

0 Likes
1,149

Actually it is AFS so PO field is different.could you please give me the program to retrive the open po not deleted.

Ananta

Read only

Former Member
0 Likes
1,149

Hello Ananta,

For fetching Open PO , use the field EKKO-FRGZU = ' ' (i.e for Release status) in where condition.

See the below code.

Data : t_ekko TYPE STANDARD TABLE OF ekko,

           i_po_num type ebeln.


SELECT ebeln  "Purchasing Document Number
                 bstyp  "Purchasing Document Category
                 bsart  "Purchasing Document Type
                 frgsx  "Release Strategy
                 ekorg  "Purchase Organisation
                 ekgrp  "Purchasing Group
                 ernam  "Name of Person who Created the Object
                 ernam  "Name of Person who Created the Object
                 eq_werks "Plant
                 bedat    "Purchasing Document Date
                 aedat "Delivery Date Header: All Items Have Same Delivery Date
                 frggr    "Release group
    FROM ekko INTO CORRESPONDING FIELDS OF TABLE t_ekko
WHERE ebeln = i_po_num AND frgzu = ''.



Hope this helps.


Thanks.

Read only

0 Likes
1,149

Hi Uday,

My Program is like this.

select a~ebeln b~matnr a~menge a~wemng

         a~zzchc1 a~zzchc1 a~zzchc1 a~j_3asize b~j_3apgnr c~aedat

         into table xeket

          from eket as a

              inner join ekpo as b on

                    a~ebeln eq b~ebeln and

                    a~ebelp eq b~ebelp

                inner join ekko as c on

                    a~ebeln eq c~ebeln

          where a~j_3aelikz eq abap_false      "open schedule line

            and c~ebeln in s_ebeln

            and c~lifnr in s_lifnr

            and c~ekorg in s_ekorg

            and c~ekgrp in s_ekgrp

            and c~bedat in s_bedat.

actually it allready taking the open PO but ......it also taking deleted PO.can you help me.......how to avoid this...I need only Open PO.

can I write there delete duplicate adjecent..........

Read only

0 Likes
1,149

Hi.

add to your logic

and b~loekz = ' '

So the select wont take the deleted PO.


Regards

Miguel

Read only

0 Likes
1,149

Hi Miguel,

Thanks for your reply.It's working fine and i am resolved my issue.

Thanks again.

Regards,

Ananta