cancel
Showing results for 
Search instead for 
Did you mean: 

SRM PO Print

Former Member
0 Kudos

Hi,

I have a query regarding the SRM PO Form. When a user takes a printout of the form, he always gets the heading on the form as "Change To Purchase Order" even if the PO is a new one.

When i checked the history of the PO, i find that the PO has the standard changed statuses for the following:

1. PO creation and follow on object item in backend.

2. Approval workflow related changes.

This is what we require:

1. When the PO is created afresh, the PO print should be "New Purchase order"

2. When the PO is changed, the PO print should be "Change to Purchase order"

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can change this in transaction SMARTFORMS. Choose From BBP_PO and click on edit button. Go to Global Settings\Global definitions and go to Initialization tab.

You can add

If

statement to the status of document.

Regards,

Marcin Gajewski

Former Member
0 Kudos

Hi Marcin,

Thanks a lot for the reply, however, i have one more query in this regard:

In the If statement, what should be the status of the document? Should it be Ordered? Coz the system does not actually change the status of the PO when it is approved or goes to the backend. Please suggest.

Former Member
0 Kudos

Hi

Read the exact / current status of the Shopping cart by using the following FM.

Using the GUID (SC Header Guid),

<b>BBP_PD_SC_GETDETAIL function module in the smartform to fetch the current status and all the other required details.</b>

<u>

Using the GUID (PO Header Guid),

Incase, you want to know the Purchase Order status, use the Function module to

<b>BBP_PD_PO_GETDETAIL</b> function module in the smartform to fetch the current status and all the other required details.</u>

Hope this will help.

Please reward suitable points.

Regards

- Atul

Former Member
0 Kudos

Hi Atul,

Thanks a lot for the reply. We made the necessary corrections in the SMARTFORM as follows:

1. When the status is I1120, the counter is set to 1 and the PO should display "Change to PO" (Field name gv_change)

2. When the status is I1043, the counter is set to 0 and the PO should display "New PO".

Still when i create a new PO, it shows "Change to PO", the reason being, that it shows the status as Change Transmitted when the PO goes to the backend.

We are now trying to capture the status through CDHDR/CDPOS. Please suggest if this is right or we have to change the code, if so, what should be the change?

Former Member
0 Kudos

Hi ,

Can someone please guide me on this one?

Ramki
Active Contributor
0 Kudos

Hi Amit

Not very sure whether this is the best solution:

Option1:

(I prefer this): Activate version management and if the PO is of changed version, then use that in SMARTFORM.

Option 2:

Create a custom field, say, Amendment number in PO header and ask users to update it whenever they make changes.

Use this field to determine changed PO in smartform.

Option 3:

In Table NAST, you will have information about print processing status. Check for processing status 1 for your document and get the date.

If you made any changes after that to PO (CDHDR/CDPOS tables), this info you can use in SMARTFORM.

Best regards

Ramki

Former Member
0 Kudos

Hi

I hope you must have coded something till the time. If yes, Where is the problem ?

I don't have access to your system..

Please paste the code here and incase you have any specific requirements, do let me know.

Hope this will help.

Please reward suitable points.

Regards

- Atul

Former Member
0 Kudos

Please see the below code:

constants : c_1 type c value '1',

c_2 type c value '2'.

read table i_status into lv_status with key stat = 'I1120'.

if sy-subrc = 0.

gv_change = '1'.

endif.

We are chking gv_change flag before printing the PO heading.

Former Member
0 Kudos

Hi

Any updates ? Is the problem resolved ?

If yes, Please reward suitable points.

Else, let me know.

Regards

- Atul

Former Member
0 Kudos

Hi,

Now the problem is, when i am creating a PO and clicking on "Order', the first time, it is showing the title as "Change to PO" instead of "PO" and when i change the PO, it shows the tilte as "PO" in place of "Change TO PO". Please advice.

Ramki
Active Contributor
0 Kudos

Hi Amit

Looks like you got the solution almost.

Why don't you reverse your condition in the program and see ?

Best regards

Ramki

Former Member
0 Kudos

Hi,

I have found out the problem partially, but unfortunately, i do not have the solution for this. What is happening is, when a SRM PO is created, it is transferred to the backend (we have ECS scenario). When it is transferred to the backend, the status of the PO changes to "Change Transmitted" I1120 and this is picked up by the form as "Change To PO".

I still do not know how after making the changes to the PO, the title changes to "New PO".

Any suggestions?

Ramki
Active Contributor
0 Kudos

Did you evaluate the other options given by me ?

Former Member
0 Kudos

Hi Rama,

Yes, i evaluated the other option given by you, but even that did not work. However, i found out the solution. In the table CRMD_ORDERADM_H, if you check the entries after a new PO is created, there is a single entry of a GUID, however, when the PO is changed, a new GUID is created. This is exactlly what i passed in the code. When the GUID is 1, the title of the PO should be "New PO". When the count of GUID is more thn 1, the title of PO is "Change to PO".