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: 

VA01 PO Number

rodrigo_paisante3
Active Contributor
0 Kudos

Hi all,

Please, some advice.

In VA01, field PO Number, is normal to fill with character string? Or only numbers?

Because the field is CHAR(35).

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

It depends on your business, it can be filled with both values.

It's not the SAP PO number, it could be that, but you need to consider your Sales Order corresponds (or should correspond) to a Purchase Order for you customer,

so in that field you should save the PO number of customer, the format of PO number depends on how the customer set the number for PO in his system.

Max

5 REPLIES 5

Former Member
0 Kudos

Hi

It depends on your business, it can be filled with both values.

It's not the SAP PO number, it could be that, but you need to consider your Sales Order corresponds (or should correspond) to a Purchase Order for you customer,

so in that field you should save the PO number of customer, the format of PO number depends on how the customer set the number for PO in his system.

Max

0 Kudos

Thanks.

I asked it because we created a sales order and filled it with a string like "Cust....1020" and create a claim (clm1) linking this sales order, and then executed IQS12 -> click notification... we  getting time out dump... in LIQS0F41 program, FORM REPLACE_SPACESIX_WITH_SPACE.


We will open (again) a ticket for it...

0 Kudos

Uhm

PO number is a "free" field, so you can insert what you need, but in this case it seems your field is elaborated by another SAP program and this program wants the field filled with a certain format.

Probably you should post the dump in order to understand how the field has to be filled, anyway the form REPLACE_SPACESIX_WITH_SPACE tries to replave the string gaving 6 POINTS, so you should insert:

Cust......1020


but I don't know why the dump occurs, you should post the dump


Max

0 Kudos

Max, the dump is time out... because the routine dies in a infinite loop!


Is very nice to see this!



Create a z program, copy and past the standard code of  REPLACE_SPACESIX_WITH_SPACE form .

Create a selection screen parameter for p_string and fill it with "ALL....(DOC)".

And a break point too...


You you see that the search command will return sy-subrc = 0... I dont know why!

Search command has a bug?

You pass 6 dots to compare and it retrieve ok for 4 only... lol!




CONSTANTS: SPACE_SIX(6) TYPE C VALUE '......'.
   CONSTANTS: I6 TYPE I VALUE 6.
   DATA:      L_SUBRC TYPE SY-SUBRC.
   SEARCH P_STRING FOR SPACE_SIX.
   L_SUBRC = SY-SUBRC.
   WHILE L_SUBRC EQ 0.
     REPLACE SPACE_SIX LENGTH I6 WITH '      ' INTO P_STRING.
     SEARCH P_STRING FOR SPACE_SIX.
     L_SUBRC = SY-SUBRC.
   ENDWHILE.

0 Kudos

Hi

Yes you are right, it seems there a strange behavior of SEARCH statament, if the string has 4 or 5 dot that command returns a SY-SUBRC = 0 but then  REPLACE fails (because it has to replace six dot) and so it has an infinitive loop.

So to insert the dot manually can be very dangerous, try to open a message to SAP

Max