Application Development 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: 

Purchase Order History in smartform

Former Member
0 Kudos
114

Hi gr8 minds

I have developed smartform for purchase order .

now i wanna develop amendment purchse order .

any idea how to go for it .

thanks & regards

siddharth

7 REPLIES 7

former_member534411
Participant
0 Kudos
79

Siddharth neekhra:

Could you please explian little bit about amendment po.

0 Kudos
79

hi

ammendment is change in purchase order .

suppose i have send a purchase order to my vendor and after sending i have changed the quantity or some other changes i have made in purchase order . than in ammendment purchase order i have to print currnet details of po as well as the details about the previous po .

regards

sidharth

0 Kudos
79

Purchase Order History is stored in <b>EKBE</b> table.

You can use this FM <b>MMPUR_EKBE_READ_EBELN</b> to get history details for a given purchase order.

Regards,

Subramanian V.

Message was edited by: Subramanian Venkateswaran

0 Kudos
79

Dear sir

thanks for ur usefull reply

but my requirement is to find the details of changed po .

which is not concern with document no. and the table EKBE gives the datails about the movement related to purchase order .

thanks & regards

siddharth

Former Member
0 Kudos
79

Hello Siddharth,

I guess you will need to get the information from

change log, ie. CDHDR and CDPOS, which would quite

a complex task.

Another option is to have a custom table, which tracks the changes to POs(you will need to use the User-exits while saving the POs).

But this solution is only viable if this is a new implementation which has not yet gone live. Or else you will have problems with POs already existing in the system.

0 Kudos
79

Hi Siddharth,

As Samir has suggested you have to get this information from CDHRD and CDPOS. In one of the posts yesterday, Andreas and Rob have nicely mentioned how to fetch data from Change Document.


CALL FUNCTION 'CHANGEDOCUMENT_READ'
  EXPORTING
*   ARCHIVE_HANDLE                   = 0
*   CHANGENUMBER                     = ' '
*   DATE_OF_CHANGE                   = '00000000'
    objectclass                      = '<b>EINKBELEG</b>'
    OBJECTID                         = EKKO-EBELN "PO Number
*   TABLEKEY                         = ' '
*   TABLENAME                        = ' '
*   TIME_OF_CHANGE                   = '000000'
*   USERNAME                         = ' '
*   LOCAL_TIME                       = ' '
*   TABLEKEY254                      = ' '
*   KEYGUID                          = ' '
*   DATE_UNTIL                       = '99991231'
*   TIME_UNTIL                       = '235959'
  tables
    editpos                          =  editpos
 EXCEPTIONS
   NO_POSITION_FOUND                = 1
   WRONG_ACCESS_TO_ARCHIVE          = 2
   TIME_ZONE_CONVERSION_ERROR       = 3
   OTHERS                           = 4
          .
IF sy-subrc <> 0.
ENDIF.

Regards,

Subramanian V.

Former Member
0 Kudos
79

Hi Siddharth,

I read that you developed a smartform for purchase order. Even we developed our own Smartform and print program. But our print program will have a selection screen which will request for PO number. But now we want to automate this process i mean when PO is created the Smartform has to print it automatically. I know that we have to add our Smartform and Print program in nace. But before doing that i want to modify my print program in such a way that it has to get PO number when the PO number is created in ME21n transaction.

Can you explain me how you implement this process?

Thanks in advance