Vendor text in the infospoke .
HI
I have created Infospoke (3.5) with DB table .ODS is feeding data to the Info spoke .There is one info object (ovendor) which i am reading from master data in the ods ,but in the info spoke i need vendor key and text when i run the Db table .Is it feasible to have vendor text fetched at runtime by using Badi if so please give me sample code where i can bring Text information.
Please reply me imm
-PN
Hi Sri,
Thanks for your input, but I can locate the fix method.
Following is the some pic for the configuratino:
1. Access sequence for text determination:
1) Text procedure:
http://p11.freep.cn/p.aspx?u=v20_p11_p_0809261114357864_0.jpg
2) Text ID's in Textprocedure
http://i3.6.cn/cvbnm/c2/32/f4/fef7620ec71c89b9b71233a643151152.jpg
3)Access Sequence for Text ID's
http://i3.6.cn/cvbnm/42/c8/0e/6ea2bce637e4ef51dccf102a67e99b91.jpg
And I am not sure how to find the access sequence for delivery - pick slip, Is it realted to the output type for the pick slip?
If possible, could you explain how the text link to the output type?
Cheer,
Rick
Similar Messages
-
How to change "vendor text " label in BBPSC01 and BBP_POC
Hi,
In French logon , i have a wrong translation for "vendor text" in the document tab for the SC and PO.
I was not able to find the correct function group where "document" tab is managed
Do you know where to change this description ?
Kind regards,
Yannsolved.
Text schema in SPRO... -
How to change Vendor text in shopping cart using BADI/Function module
Hi
If any could help me out that i want to change vendor text using BADI/FMs.
Using BADI" bbp_catalog_transfer" i dint find any parameter for vendor text. please let me know if there any idea to resolve the problemHi,
you should find the vendor text within the BAdi
BBP_DOC_CHANGE
Method for shopping carts
BBP_SC_CHANGE
Here you could use the Changing Parameter
CT_LONGTEXT
The table contains 2 important fields:
TDID, where you can identify the type of text, in your case this should be ITXT for standard shopping carts (vendor text within positions)
TDLINE: which contains the text
You are now able to change the vendor text directly within this BAdi with standard ABAP methods.
Best regards
Andreas -
Extended Classic Scenerio and Vendor Text
This subject has been brought up before, I've reviewed all those messages. The standard SRM product does not replicate vendor text to the backend system in the extended classic mode.
Having said that, I've been trying to make this work and hope someone here can give me some insight on what I am doing wrong.
In my setup, SRM is using function module B46B_DPO_TRANSFER to send the purchase order to R/3. This fm has a table called i_longtext that contains the header text.
B46B_DPO_TRANSFER calls FUNCTION 'BBP_PO_INBOUND' DESTINATION lv_destination" to create the PO on R/3. This call is missing the POTEXTHEADER table definition. So, I've modified the call to include this table and also filled the table with the following values:
po_item = 00000
text_id = F01 "this value was obtained from the text type for purchase order header configuration settings in R/3"
text_form = *
text_line = "the message that was typed in the header text"
I can't seem to get the header text to appear on the purchase order in the backend, has anyone been successful in making this work?
Kind regards,
Shawn O'ConnorHi
<i>Incase BBP_LONGTEXT_BADI does not helps, then you can use the BADI, which i mentioned in my earlier post.</i>
<b>In the BADI - BBP_CATALOG_TRANSFER, there is a table structure, which holds the long text data.
Refer table ET_SC_LONGTEXT inside ENRICH_ITEM_DATA method of this BADI.</b>
<u>Here is the documenatation of this BBP_CATALOG_TRANSFER BADI.</u>
Short Text
Transfer Shopping Cart from Catalog
You can use the Business Add-In BBP_CATALOG_TRANSFER to change or add to the data that the catalog returns to SAP Enterprise Buyer via the catalog interface.
Note that your changes also affect the following applications in SAP Enterprise Buyer:
Confirm Goods Receipt/Service Entry
Plan Products for Maintenance Order
The call of this BAdI occurs in function module 'BBP_WS_IMPORT_SC_DATA'. This module is called by the relevant application to import catalog items previously sent by the browser of the user to the application Web server from there. After the catalog has transferred the data to SAP Enterprise Buyer the system carries out the following actions.
Conversion of ISO code of unit of measure and currency to SAP format
Conversion of price field to SAP format
In the case of transfer of a material or service number:
The system reads the product master with this number. If the number exists, the system transfers from the product master record the description and the purchase order unit of measure.
In the case of a partner number:
The system reads the business partner master with this number. If the number does not exist, the number in the shopping cart item is reset.
Note
In previous Releases, only the tables with the prefix "ENRICHED" were available. These were then returned to the calling application and transferred to the relevant document structure from there. From this Release on, the data is transferred from the current document structure to the application. The relevant tables are included as additional parameters (parameters with the prefix "ET_SC_").
New implementations should use these tables only and set the parameter "ev_sc_structures_used". In order that previous implementations need not be changed, a mapping occurs after the BADI. The parameter controls the mapping direction:
Set: New structure overwrites old structure
Not set: Old structure overwrites new structure
In the method ENRICH_ITEM_DATA, the following parameters are available:
catalog_content
This parameter contains the original data that the catalog transferred to the catalog interface. The structure corresponds exactly to the catalog interface. The data in this parameter is only for information purposes, you make any changes in the parameters et_sc_item_data , et_sc_accounting, et_sc_partner, et_sc_orgdata, et_sc_longtext, and et_sc_messages.
Note
The catalog interface also contains customer fields that you can use for your own purposes. You can pass these on in fields that the application can use further.
enriched_item_data
This parameter contains the data for a shopping cart item in Enterprise Buyer.
Note
This table should not be used in new implementations (see above Note).
enriched_acct_data
This parameter contains all account assignment fields. This parameter is empty at this time in the standard system.
Note
This table should not be used in new implementations (see above Note).
enriched_item_longtext
This parameter contains the long texts for the items.
Note
This table should not be used in new implementations (see above Note).
catalog_content_errors
This parameter contains the error messages that occurred when the catalog items were being enriched.
Note
This table should not be used in new implementations (see above Note).
ev_sc_structures_used
This parameter has to be set if the following tables are used in the implementation (recommended procedure, see Note above) et_sc_item_data This parameter contains the data of a shopping cart item in Enterprise Buyer.
et_sc_accounting
This parameter contains all account assignment fields. In the standard system, this parameter is empty at this time.
et_sc_partner
This parameter contains the links to the requester and the supplier, if used.
et_sc_orgdata
This parameter contains the links to the org. data for the partners from
et_sc_partner.
et_sc_longtext
This parameter contains the long texts for the items.
et_sc_messages
This parameter contains the error messages that occurred during enrichment of catalog items. If this table contains a message of type 'E', the item causing this error is not transferred to et_sc_item_data. If the item is added in the BADI again (from the data from catalog_content), the relevant error message should be deleted, since the current SRM Server application generally searches this table for error messages of type 'E' in order to output an error message to the user.
Hope this will help.
Please reward suitable points.
Regards
- Atul -
Defaulting Standard Text into Vendor Text
Hello,
We have been asked if we can add functionality similar to the S010 standard texts in R/3, so that a SRM user can select from a list of standard texts. The text would default into the Vendor Text on the Shopping Cart, the user would be able to amend the text if required.
Does anyone know if this is achievable? I assume it would have to be done via a BADI?
Thank you.
Kind Regards,
Jackie JonesHello Jackie,
Use text schema to achieve your request: you can define fixed values for texts.
In SRM 7.0 release, it is in IMG:
SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Cross-Application Basic Settings > Text Schema
I think path is the same for lower releases.
If you use fixed values, this means vendor text coming from your catalog has to make part of your fixed values.
Regards.
Laurent. -
Default text in the body of mail when sent to vendor thru PO
Dear friends,
We need to put in the email body a message to vendor.
We wrote in the tcode NACE a message in the text field and the email was generated , but without the text body !
The attachment has been generated correctly. but no text in the body mail...
Does anyone knows the way to send email with a default body text to vendors ?
best regards,
AleHi
You need to do some configuration for this.
Goto NACE .
Select EF and click on OUTPUT TYPES.
Then select Output Type NEU and click on processing routines .
In that you have to add a new entry - medium 5 .
Then you need to assign a program, form routine and form.
You can use the standard program i.e. SAPFM06P, FORM routine is always ENTRY_NEU and standard MEDRUCK.
Then in PARTNER FUNCTION you need to add a new entry : medium - 5 and function - VN .
For subject of the mail goto Mail Title and Texts. In title give PO No. &EKKO-EBELN& .
Under General data -> Replacement of text symbols give programm as SAPMM06E and Form Routine as
TEXT_SYMBOL_REPLACE .
Now the subject will be PO No. 1800004202.
You need to maintain your email id in tcode SU01 and also the vendor's email id.
Now while creating a new purchase order , change the medium to External Send .
Then goto Communication Method and select CS01 . ALSO make sure that the Cover Page Text has value PO No. &EKKO-EBELN& .
Goto tcode ME9F .
Execute.
Select the checkbox and click on Output Message.
You will get a message MAII 00000000000001 generated .
If the BASIS guys have made the necessary configuration for sending mail then the mail will go .
You can see the status and what is sent via tcode SOST.
Hope it helps
Best Regards -
Vendor text doesn't transfer from SRM PO to R/3
Good evening,
We are new in SRM SCE, we have a problem with the vendor text. In SRM appears this information and the PO is e-mailed correctly but when we review the PO in R/3 this information doesn't fill in. We don't know if the problem is in SRM or in R/3.
In BBP_PD the information, vendor text, is contained under TDID with the ITXT code. What can we review? We have take a look to some BADI (IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND) in SRM but it comes with the data blocked and we can't change their contain, concretely CS_BAPI_POITEM_EXT.
Thanks in advance,
FranciscoWhich scenario are you using in SRM?
Do you have a requisition created prior to the PO on the R3 side? If so, check and see if the text is there. Then, check the configuration on the R3 side to make sure the text on the requisition is adopted to the PO. Since the shopping cart is line item level, it will appear on the line item on the PO.
Monique Stephens -
Vendor Text must be copied into PO texts.
Hi Experts
I assume that both "Purchasing Memo" and "Purchase Order Text" should be copied from the vendor master. When testing, only the "Purchase Order Text" is getting copied into the Purchase order.
However i want the purchasing memo to also appear in the PO .
Any idea how to set this in this system?
Thanks
DkmurthyHi Experts
I assume that both "Purchasing Memo" and "Purchase Order Text" should be copied from the vendor master. When testing, only the "Purchase Order Text" is getting copied into the Purchase order.
However i want the purchasing memo to also appear in the PO .
Any idea how to set this in this system?
I have already maintained the text in the vendor master for "purchasing memo" & "purchasing order text".
but not able to bring the purcahsing memo details to the purchase order automatically.
My question is how /where to config the purchasing memo in the system so that it gets copied automatically in the PO
Thanks
Dkmurthy -
Hi,
We need the vendor texts tobe pulled into PO header text. So I configure as follows: SPRO->IMG->Materials Management->PO->Texts for PO->Define copying rules for Header Texts. In header text linkages -> added the source object -"Vendor Master" to the source text "Header Text". The issue is:
I dont find the option PO header Text in vendor master(XK02) -menu-> extras -> text. I can see only the options for accounting text and PO memo but not PO header text that I added in the config.
Please assist.
Thank you.Hi Sharan,
Vendor master has three types of texts - text object LFA1 on the general level, text object LFB1 on the comp. code level and the text object LFM1 on the purchasing org. level. To see the text types of the object LFM1 you shall go to the purchasing view of the vendor master and then choose in the menu "Extras -> Texts". If you do the same on the general level of the vendor master (e.g. the view "control") or on the comp. code level (e.g. the view "accounting info"), the system will only show the text types of the corresponding object types LFA1 or LFB1.
BR
Raf -
Vendor text font needs to be changes to appear in PO header.
Hi ,
I am trying to fit some vendor text (P. org level) from vendor master in PO header area.
The PO header area is restricted and i dont want to change my PO form.
So, i can currently fit only 3 - 4 lines of text while i need to fit 6 lines of text.
There must be a way to make the font smaller, but only the vendor master PO text format should get changed, no other default fonts.
Please suggest.
Thanks,
RitikaHi Lakshman,
Thanks for your reply. I have been looking into it since i posted the question but looks like the font is fine, any smaller and noone will be able to read. And we dont want to touch the PO form too as it will change everything globally which we do not want. That will be the last resort.
Regards,
Ritika -
BADI 'ME_PROCESS_PO_CUST to populate TEXT at the time of PO creation
Hello All,
I am using the above BADI to attempt to populate calculated text from class characteristics into a purchase order. Does anyone know if this can be done.I have checked the parameters that are available for this BADI (MEPOHEADER and MEPOITEM) and I do not see fields for TEXT.
The business requirement is that certain text is calculated from the vendor characteristics and this must be populated into the PO during its creation. Since the PO has not been committed to the database the function modules for this 'SAVE_TEXT' cannot be used.
Please advise.hi,
Vivek is right u have to use same badi , it helps u out,
below i gives u code plz ref that, in which u have to call
CALL METHOD im_header->if_longtexts_mm~set_text
as given below through this code u can maintain long text for each id in header of po.
METHOD if_ex_me_process_po_cust~process_header.
DATA: l_repid TYPE sy-repid,
l_dynumb TYPE d020s-dnum,
l_fldnam TYPE dynpread-fieldname.
DATA: l_value2(80).
DATA : re_data1 TYPE mepoheader.
l_repid = 'SAPLMEGUI'.
l_dynumb = '1105'.
l_fldnam = 'MEPO_TOPLINE-BSART'.
CALL FUNCTION 'GET_DYNP_VALUE'
EXPORTING
i_field = l_fldnam
i_repid = l_repid
i_dynnr = l_dynumb
I_CONV_INPUT = ' '
I_CONV_OUTPUT = ' '
CHANGING
o_value = l_value2.
CODE IS ADDED BY SANTOSH KUBAL**** DT :8.01.2009
REQ : SANTOSH JAGTAP***
***PURPOSE: FOR PUR.ORGANISTION 2700 & 2701 WHEN NEW PO IS CREATED
DEFULT HEADER TEXT WILL BE CALL IN HEADER NOTE ID- F02 ***
***DEFULT HEADER TEXT is mentain in SO10 TEXT ID ST .
IF sy-tcode = 'ME21N'.
DATA: l_purorg(8).
DATA: im_tdid TYPE tdid. "Importing
DATA: im_textlines TYPE mmpur_t_textlines .
DATA: wa_textlines LIKE LINE OF im_textlines.
DATA: text_tab TYPE TABLE OF tline,
wa_text_tab TYPE tline.
l_repid = 'SAPLMEGUI'.
l_dynumb = '1221'.
l_fldnam = 'MEPO1222-EKORG'.
CALL FUNCTION 'GET_DYNP_VALUE'
EXPORTING
i_field = l_fldnam
i_repid = l_repid
i_dynnr = l_dynumb
CHANGING
o_value = l_purorg.
IF l_purorg = '2700' OR l_purorg = '2701'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ST'
language = sy-langu
name = 'DEFULT_HEADR_TEXT'
object = 'TEXT'
TABLES
lines = text_tab
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF text_tab IS NOT INITIAL.
LOOP AT text_tab INTO wa_text_tab .
wa_textlines-tdline = wa_text_tab-tdline.
APPEND wa_textlines TO im_textlines.
ENDLOOP .
ENDIF.
wa_textlines-tdobject = 'TEXT' .
wa_textlines-tdid = 'ST'.
wa_textlines-tdformat = 'SP'.
APPEND wa_textlines TO im_textlines.
CALL METHOD im_header->if_longtexts_mm~set_text
EXPORTING
im_tdid = 'F02'
im_textlines = im_textlines.
ENDIF.
ENDIF.
***end of code**
ENDMETHOD. -
Text limit in PO - Vendor text
Hi ALL,
Is there are limit in vendor texts? My user has entered a large text in the Po -vendor text.
While ordering the PO it gave a dump error. I suspect long text could be the reason.
I am using SRM 4.0 - Ex classic scenario.
Could you please help me to resolve the issue?
Thanks.
Dump details
Runtime Error DATA_LENGTH_NEGATIVE
Except. CX_SY_RANGE_OUT_OF_BOUNDS
Short text: Invalid partial field access: Negative length
What happened?
Error in ABAP application program.
The current ABAP program "/1BCDWB/SAPLSF00000001" had to be terminated because
one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_RANGE_OUT_OF_BOUNDS',
was neither
caught nor passed along using a RAISING clause, in the procedure "%GLOBAL_INIT"
"(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
The system tried to access field "LV1" with length
"-10" in the current program "/1BCDWB/SAPLSF00000001".
Partial field access is not allowed with negative length specifications.
How to correct the error
Please use a positive length specification when trying to access a
field "LV1".
If the error occurred in one of your own programs or in an SAP program
that you modified, try to correct it yourself.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"DATA_LENGTH_NEGATIVE" CX_SY_RANGE_OUT_OF_BOUNDSC
"/1BCDWB/SAPLSF00000001" or "/1BCDWB/LSF00000001F01"
"%GLOBAL_INIT"
Information on where terminated
The termination occurred in the ABAP program "/1BCDWB/SAPLSF00000001" in
"%GLOBAL_INIT".
The main program was "SAPLBBP_PO_UI_ITS ".
The termination occurred in line 1420 of the source code of the (Include)
program "/1BCDWB/LSF00000001F01"
of the source code of program "/1BCDWB/LSF00000001F01" (when calling the editor
14200).
Processing was terminated because the exception "CX_SY_RANGE_OUT_OF_BOUNDS"
occurred in the
procedure "%GLOBAL_INIT" "(FORM)" but was not handled locally, not declared in
the
RAISING clause of the procedure.
The procedure is in the program "/1BCDWB/SAPLSF00000001 ". Its source code
starts in line 621
of the (Include) program "/1BCDWB/LSF00000001F01 ".
Line SourceCde
1390 WA_LONGTEXT-TDID TO WA_ITEMTAB-TDID,
1391 'EN' TO WA_ITEMTAB-TDSPRAS,
1392 LV2 TO WA_ITEMTAB-TDLINE.
1393 APPEND WA_ITEMTAB TO LT_ITEMTAB.
1394 CLEAR WA_ITEMTAB.
1395 CLEAR: LV2, WA_ITEMTAB.
1396 * If LV_REMAINING is GT 110 then tranfer 110 char from LV1 to LV2 and append to int table
1397 IF LV_REMAINING > 110. "
1398 MOVE LV1+LV_ADDLEN(110) TO LV2.
1399 MOVE: WA_LONGTEXT-GUID TO WA_ITEMTAB-GUID,
1400 WA_LONGTEXT-TDID TO WA_ITEMTAB-TDID,
1401 'EN' TO WA_ITEMTAB-TDSPRAS,
1402 LV2 TO WA_ITEMTAB-TDLINE.
1403 APPEND WA_ITEMTAB TO LT_ITEMTAB.
1404 CLEAR WA_ITEMTAB.
1405 CLEAR: LV2, WA_TAB.
1406 * Now move whatever is left in LV1 to LV2
1407 LV_LEFTOVER = LV_ADDLEN + 110.
1408 LV_REMOVE = LEN1 - LV_LEFTOVER.
1409 MOVE LV1+LV_LEFTOVER(LV_REMOVE) TO LV2.
1410 ELSE. "
1411 MOVE LV1+LV_ADDLEN(LV_REMAINING) TO LV2.
1412 ENDIF. "
1413 LV_FLAG = 'X'.
1414 EXIT.
1415 ENDIF. "
1416 LV_COUNTER = LV_COUNTER - 1.
1417 ENDDO.
1418 * In case of no space in between characters
1419 IF LV_FLAG NE 'X'. "
>>>>> CONCATENATE LV2 LV1+0(LEN3) INTO LV2.
1421 * MOVE: WA_LONGTEXT-GUID TO LT_ITEMTAB-GUID,
1422 * WA_LONGTEXT-TDID TO LT_ITEMTAB-TDID,
1423 * 'EN' TO LT_ITEMTAB-TDSPRAS,
1424 * LV2 TO LT_ITEMTAB-TDLINE.
1425 * APPEND LT_ITEMTAB.
1426 MOVE: WA_LONGTEXT-GUID TO WA_ITEMTAB-GUID,
1427 WA_LONGTEXT-TDID TO WA_ITEMTAB-TDID,
1428 'EN' TO WA_ITEMTAB-TDSPRAS,
1429 LV2 TO WA_ITEMTAB-TDLINE.
1430 APPEND WA_ITEMTAB TO LT_ITEMTAB.
1431 CLEAR WA_ITEMTAB.
1432 CLEAR: LV2, WA_TAB.
1433 LEN4 = LEN3 + 1.
1434 MOVE LV1+LEN4(LEN1) TO LV2.
1435 CLEAR: LEN4, LEN3, LEN1.
1436 ENDIF. "
1437 ELSEIF LEN1 = 0. "
1438 * MOVE: WA_LONGTEXT-GUID TO LT_ITEMTAB-GUID,
1439 * WA_LONGTEXT-TDID TO LT_ITEMTAB-TDID,Hi ALL,
Is there are limit in vendor texts? My user has entered a large text in the Po -vendor text.
While ordering the PO it gave a dump error. I suspect long text could be the reason.
I am using SRM 4.0 - Ex classic scenario.
Could you please help me to resolve the issue?
Thanks.
Dump details
Runtime Error DATA_LENGTH_NEGATIVE
Except. CX_SY_RANGE_OUT_OF_BOUNDS
Short text: Invalid partial field access: Negative length
What happened?
Error in ABAP application program.
The current ABAP program "/1BCDWB/SAPLSF00000001" had to be terminated because
one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_RANGE_OUT_OF_BOUNDS',
was neither
caught nor passed along using a RAISING clause, in the procedure "%GLOBAL_INIT"
"(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
The system tried to access field "LV1" with length
"-10" in the current program "/1BCDWB/SAPLSF00000001".
Partial field access is not allowed with negative length specifications.
How to correct the error
Please use a positive length specification when trying to access a
field "LV1".
If the error occurred in one of your own programs or in an SAP program
that you modified, try to correct it yourself.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"DATA_LENGTH_NEGATIVE" CX_SY_RANGE_OUT_OF_BOUNDSC
"/1BCDWB/SAPLSF00000001" or "/1BCDWB/LSF00000001F01"
"%GLOBAL_INIT"
Information on where terminated
The termination occurred in the ABAP program "/1BCDWB/SAPLSF00000001" in
"%GLOBAL_INIT".
The main program was "SAPLBBP_PO_UI_ITS ".
The termination occurred in line 1420 of the source code of the (Include)
program "/1BCDWB/LSF00000001F01"
of the source code of program "/1BCDWB/LSF00000001F01" (when calling the editor
14200).
Processing was terminated because the exception "CX_SY_RANGE_OUT_OF_BOUNDS"
occurred in the
procedure "%GLOBAL_INIT" "(FORM)" but was not handled locally, not declared in
the
RAISING clause of the procedure.
The procedure is in the program "/1BCDWB/SAPLSF00000001 ". Its source code
starts in line 621
of the (Include) program "/1BCDWB/LSF00000001F01 ".
Line SourceCde
1390 WA_LONGTEXT-TDID TO WA_ITEMTAB-TDID,
1391 'EN' TO WA_ITEMTAB-TDSPRAS,
1392 LV2 TO WA_ITEMTAB-TDLINE.
1393 APPEND WA_ITEMTAB TO LT_ITEMTAB.
1394 CLEAR WA_ITEMTAB.
1395 CLEAR: LV2, WA_ITEMTAB.
1396 * If LV_REMAINING is GT 110 then tranfer 110 char from LV1 to LV2 and append to int table
1397 IF LV_REMAINING > 110. "
1398 MOVE LV1+LV_ADDLEN(110) TO LV2.
1399 MOVE: WA_LONGTEXT-GUID TO WA_ITEMTAB-GUID,
1400 WA_LONGTEXT-TDID TO WA_ITEMTAB-TDID,
1401 'EN' TO WA_ITEMTAB-TDSPRAS,
1402 LV2 TO WA_ITEMTAB-TDLINE.
1403 APPEND WA_ITEMTAB TO LT_ITEMTAB.
1404 CLEAR WA_ITEMTAB.
1405 CLEAR: LV2, WA_TAB.
1406 * Now move whatever is left in LV1 to LV2
1407 LV_LEFTOVER = LV_ADDLEN + 110.
1408 LV_REMOVE = LEN1 - LV_LEFTOVER.
1409 MOVE LV1+LV_LEFTOVER(LV_REMOVE) TO LV2.
1410 ELSE. "
1411 MOVE LV1+LV_ADDLEN(LV_REMAINING) TO LV2.
1412 ENDIF. "
1413 LV_FLAG = 'X'.
1414 EXIT.
1415 ENDIF. "
1416 LV_COUNTER = LV_COUNTER - 1.
1417 ENDDO.
1418 * In case of no space in between characters
1419 IF LV_FLAG NE 'X'. "
>>>>> CONCATENATE LV2 LV1+0(LEN3) INTO LV2.
1421 * MOVE: WA_LONGTEXT-GUID TO LT_ITEMTAB-GUID,
1422 * WA_LONGTEXT-TDID TO LT_ITEMTAB-TDID,
1423 * 'EN' TO LT_ITEMTAB-TDSPRAS,
1424 * LV2 TO LT_ITEMTAB-TDLINE.
1425 * APPEND LT_ITEMTAB.
1426 MOVE: WA_LONGTEXT-GUID TO WA_ITEMTAB-GUID,
1427 WA_LONGTEXT-TDID TO WA_ITEMTAB-TDID,
1428 'EN' TO WA_ITEMTAB-TDSPRAS,
1429 LV2 TO WA_ITEMTAB-TDLINE.
1430 APPEND WA_ITEMTAB TO LT_ITEMTAB.
1431 CLEAR WA_ITEMTAB.
1432 CLEAR: LV2, WA_TAB.
1433 LEN4 = LEN3 + 1.
1434 MOVE LV1+LEN4(LEN1) TO LV2.
1435 CLEAR: LEN4, LEN3, LEN1.
1436 ENDIF. "
1437 ELSEIF LEN1 = 0. "
1438 * MOVE: WA_LONGTEXT-GUID TO LT_ITEMTAB-GUID,
1439 * WA_LONGTEXT-TDID TO LT_ITEMTAB-TDID, -
Values in "vendor batch" in the Goods-in-order and Goods-in-plan lists are
Vendor batch No. : Transaction ZJPMPU322
(Background)
There are "vendor batch" and "batch" fields in Goods-in-order and Goods-in-plan lists (transaction ZJPMPU322). Values for these fields are retrieved from inbound delivery document (transaction VL33N). After core 7.0 upgrade, "vendor batch" is not copied from "batch" in inbound delivery document any more so that nothing appears in the vendor batch field in the lists.
(Change request)
Values in "vendor batch" in the Goods-in-order and Goods-in-plan lists are retrieved from "batch" in inbound delivery document ONLY IF "vendor batch" is blank in the inbound delivery document.
(Current design)
Batch is retrieved from LIPS-CHARG
Vendor batch is retrieved from LIPS-LICHN
(If there is no record in LIPS, blank will be printed out for both fields)
(After change)
Batch is retrieved from LIPS-CHARG
Vendor batch is retrieved from LIPS-LICHN only if LIPS-LICHN is not blank.
If LIPS-LICHN is blank, vendor batch is retrieved from LIPS-CHARG.
(If there is no record in LIPS, blank will be printed out for both fields. If both LIPS-CHARG and LIPS-LICHN are blank, blank will be printed out for both fields),
Following is the program:
REPORT zjpmrpu322 MESSAGE-ID zjpm001
NO STANDARD PAGE HEADING
LINE-COUNT 50
LINE-SIZE 255.
*& Development ID: PU_DD_322_LJP *
*& Report : ZJPMRPU322 *
*& The Purpose of this program is to print the Goods-in-order list *
*& and the Goods in plan list for raw materials, materials purchase *
*& etc at the Sasayama plant, Japan. *
*& Change Log: *
*& Init Who Date Text *
*& PV P V R S Varma 07-May-2003 Initial Version *
*& DU D.Usui 2004/02/26 CR No. 1432 *
*& DU D.Usui 2004/03/08 CR No. 1447 *
*& DU D.Usui 2004/05/06 CR No. 1591 *
Constants
CONSTANTS:
c_werks LIKE ekpo-werks VALUE 'JP01', "Plant code - Sasayama plant
c_id LIKE thead-tdid VALUE 'F02', "Text ID for Info record
c_object LIKE thead-tdobject VALUE 'EKPO',"Object of text for info rec
*c_zzjp_r1 LIKE marc-zzjp_re1 VALUE 'GMP', "Goods in plan- Domestic
*c_zzjp_r2 LIKE marc-zzjp_re1 VALUE 'GMPI', "Import sales order document
c_plus TYPE c VALUE '', "Holding '' sign
c_spras LIKE makt-spras VALUE 'J', "Language key Japan
*c_device(7) type c value 'PRINTER', "Device type
c_form(16) TYPE c VALUE 'ZJPMPU305', "Form name
c_ele_gmp(4) TYPE c VALUE 'GMP', "GMP Text element
c_ele_gmpi(4) TYPE c VALUE 'GMPI', "GMPI Text element
add begin CR1432
c_ele_bgmp(4) TYPE c VALUE 'BGMP', "BGMP
c_ele_bgmpi(5) TYPE c VALUE 'BGMPI', "BGMPI
add end CR1432
c_function(3) TYPE c VALUE 'SET', "Function
c_type(4) TYPE c VALUE 'BODY', "Window area in main window
c_win_head(7) TYPE c VALUE 'HEADING', "Heading window
c_win_shead(7) TYPE c VALUE 'SUBHEAD', "sub heading window
c_win_fot1(7) TYPE c VALUE 'FOOTER1', "Footer 1 window
c_win_main(4) TYPE c VALUE 'MAIN', "Main window
c_comd(8) TYPE c VALUE 'NEW-PAGE', "New-page command
c_zar TYPE ekko-bsart VALUE 'ZAR',
c_x TYPE c VALUE 'X', "Indicator for print options
c_f TYPE c VALUE 'F', "Indicator for Purchase Order
add begin CR1591
Deletion indicator in purchasing document
c_loekz(1) TYPE c VALUE 'L',
For ranges tables
c_sign_i(1) TYPE c VALUE 'I', "Sign(include)
c_op_eq(2) TYPE c VALUE 'EQ', "Option(=)
Confirmation category
c_ebtyp_ab(2) TYPE c VALUE 'AB', "Order acknowledgment
add end CR1591
c_la(2) TYPE c VALUE 'LA'. "Indicator for Inbound deliver
Database Tables
Vaiables / Internal tables *
Internal table to store PO information
Not used after CR1591
DATA: BEGIN OF t_purc OCCURS 0,
ebeln LIKE eket-ebeln, "Purchasing Document Number
ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled quantity
charg LIKE eket-charg, "Batch number
matnr LIKE ekpo-matnr, "Material code
werks LIKE ekpo-werks, "Plant
meins LIKE ekpo-meins, "Unit of measure
lifnr LIKE ekko-lifnr, "Vendor number
END OF t_purc.
Internal table to store material description.
DATA: BEGIN OF t_makt OCCURS 0,
matnr LIKE makt-matnr, "Material code
maktx LIKE makt-maktx, "Material description
END OF t_makt.
Internal table for storage of final EKET data
DATA: BEGIN OF t_eket OCCURS 0,
ebeln LIKE eket-ebeln, "Purchasing Document Number
ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
ebelp_ex(6) TYPE n, "Extended ebelp with length 6
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled quantity
dabmg LIKE ekes-dabmg, " Delivered Quantity
charg LIKE eket-charg, "Batch number
matnr LIKE ekpo-matnr, "Material code
werks LIKE ekpo-werks, "Plant
maktx LIKE makt-maktx, "Material Description-- jp check
etens LIKE ekes-etens, "Sequence Number
meins LIKE ekpo-meins, "Unit of measure
lifnr LIKE ekko-lifnr, "Vendor number
vbeln LIKE ekes-vbeln,
vbelp LIKE ekes-vbelp,
vpnam(40) TYPE c, "Vendor product name
END OF t_eket.
Internal table for extraction of data from EKES
Not used after CR1591
DATA: BEGIN OF t_ekes OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE ekes-eindt, "Item delivery date
menge LIKE ekes-menge, "Scheduled Quantity
dabmg LIKE ekes-dabmg, " delivered quantity
vbeln LIKE ekes-vbeln,
vbelp LIKE ekes-vbelp,
mark TYPE c,
END OF t_ekes.
Internal table for extraction of data from EKES
Not used after CR1591
DATA: BEGIN OF t_ekes_temp OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE ekes-eindt, "Item delivery date
menge LIKE ekes-menge, "Scheduled Quantity
END OF t_ekes_temp.
Internal table for storing data from MLGN table.
DATA: BEGIN OF t_mlgn OCCURS 0,
matnr LIKE mlgn-matnr, "material code
lhmg1 LIKE mlgn-lhmg1, "Standard pallet size
lhme1 LIKE mlgn-lhme1, "Unit of measure
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
END OF t_mlgn.
Internal table for storing data from MARM table.
DATA: BEGIN OF t_marm OCCURS 0,
matnr LIKE marm-matnr, "material code
umrez LIKE marc-zzjp_cas_size, "Std package unit
meins LIKE ekpo-meins, "alternate unit
END OF t_marm.
Internal table for storing data from MARC table.
DATA: BEGIN OF t_marc OCCURS 0,
matnr LIKE marc-matnr, "Material code
zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
zzjp_aprn LIKE marc-zzjp_aprn, "Apperance
zzjp_re1 LIKE marc-zzjp_re1, "Heading
END OF t_marc.
Internal table for storing data from lfa1 table.
DATA: BEGIN OF t_lfa1 OCCURS 0,
lifnr LIKE lfa1-lifnr, "Vendor code
name1 LIKE lfa1-name1, "Vendor name
END OF t_lfa1.
Internal table for Storing data from LIPS table.
DATA: BEGIN OF t_lips OCCURS 0,
vbeln LIKE lips-vbeln, "Delivery document no
posnr LIKE lips-posnr, "Item number for Delivery document
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
END OF t_lips.
Internal table for storing the final display data.
DATA: BEGIN OF t_display OCCURS 0,
g_checkbox type c, "check box for selection of records
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled Quantity
vpnam(40) TYPE c, "Vendor product name
lifnr LIKE ekko-lifnr, "Vendor code
name1 LIKE lfa1-name1, "Vendor name
meins LIKE ekpo-meins, "Unit of measure
matnr LIKE ekpo-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description-- jp check
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
lhmg1 LIKE mlgn-lhmg1, "standard pallet size
lhme1 LIKE mlgn-lhme1, "Unit of standard pallet
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
umrez LIKE marc-zzjp_cas_size, "Std package unit
meinh LIKE ekpo-meins, "alternate unit
zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
zzjp_aprn LIKE marc-zzjp_aprn, "Apperance
zzjp_re1 LIKE marc-zzjp_re1, "Heading
std_pac_no(13) TYPE n, "Std receipt package no
tot_std_pt(13) TYPE n, "Total no of std pallets
add begin CR1447
Add new field 'Goods-in-order','Item' for goods in plan list
vbeln like ekes-vbeln, "Goods-in-order
vbelp like ekes-vbelp, "Item
add end CR1447
END OF t_display.
Internal table for storing the final display data -Goods in order list
DATA: BEGIN OF t_display1 OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled Quantity
vpnam(40) TYPE c, "Vendor product name
lifnr LIKE ekko-lifnr, "Vendor code
name1 LIKE lfa1-name1, "Vendor name
meins LIKE ekpo-meins, "Unit of measure
matnr LIKE ekpo-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description-- jp check
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
lhmg1 LIKE mlgn-lhmg1, "standard pallet size
lhme1 LIKE mlgn-lhme1, "Unit of standard pallet
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
umrez LIKE marc-zzjp_cas_size, "Std package unit
meinh LIKE ekpo-meins, "alternate unit
zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
zzjp_aprn LIKE marc-zzjp_aprn, "Apperance
zzjp_re1 LIKE marc-zzjp_re1, "Heading
std_pac_no(13) TYPE n, "Std receipt package no
tot_std_pt(13) TYPE n, "Total no of std pallets
END OF t_display1.
Internal table for storing the final display data - Goods in plan list
DATA: BEGIN OF t_display2 OCCURS 0,
ebeln LIKE ekes-ebeln, "Purchasing Document Number
ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
etens LIKE ekes-etens, "Sequence No
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled Quantity
name1 LIKE lfa1-name1, "Vendor name
meins LIKE ekpo-meins, "Unit of measure
matnr LIKE ekpo-matnr, "Material Number
maktx LIKE makt-maktx, "Material Description-- jp check
charg LIKE lips-charg, "Batch number
lichn LIKE lips-lichn, "Vendor Batch number
lhmg1 LIKE mlgn-lhmg1, "standard pallet size
lety1 LIKE mlgn-lety1, "tower
ltkze LIKE mlgn-ltkze, "Storage location
tot_std_pt(13) TYPE n, "Total no of std pallets
add begin CR1447
Add new field 'Goods-in-order','Item' for goods in plan list
vbeln like ekes-vbeln, "Goods-in-order
vbelp like ekes-vbelp, "Item
add end CR1447
END OF t_display2.
add begin CR1591
RANGES: r_matnr FOR mara-matnr, "for p_matnr
r_ebeln FOR ekpo-ebeln. "for p_ebeln
add end CR1591
DATA: line TYPE i. " line number
DATA: g_checkbox TYPE c. "check box for selection of records
DATA: g_tab LIKE sy-index. "variable to hold index
DATA g_tabix LIKE sy-tabix. "holder for table index
Printing Options.
DATA: lw_pr_options LIKE itcpo.
*lw_pr_options-tddest = 'SA03'. " Print Device Name
lw_pr_options-tdpreview = 'X'. " Print Preview
lw_pr_options-tdnewid = 'X'. " New Request
lw_pr_options-tdlifetime = 2. " Retention in Spool
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
SELECT-OPTIONS:
s_date FOR sy-datum DEFAULT sy-datum. " Search period.
PARAMETERS:
p_matnr LIKE mara-matnr, " Material code
p_ebeln LIKE ekpo-ebeln. " Purchase Document No
SELECTION-SCREEN END OF BLOCK blk1.
Selection Screen Checks *
AT SELECTION-SCREEN.
IF ( s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
MESSAGE e000 WITH 'Entry Must in atleast one of the Fields'(t00).
ENDIF.
IF ( NOT p_matnr IS INITIAL ) AND
( s_date IS INITIAL ) AND
( p_ebeln IS INITIAL ).
MESSAGE e000 WITH 'Date should also be Entered'(t01).
ENDIF.
del begin CR1591
This check is not found in original FS
IF ( NOT p_matnr IS INITIAL ) AND
( s_date IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
MESSAGE e000 WITH 'Date should also be Entered'(t01).
ENDIF.
del end CR1591
Validations for Data selection *
del begin CR1591
Waste check
IF ( NOT s_date IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
PERFORM f_check_date_in_eket.
ENDIF.
IF ( NOT s_date IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
PERFORM f_check_matnr_in_plant.
PERFORM f_check_matnr_in_ekpo.
PERFORM f_check_date_in_eket.
PERFORM f_check_matnr_in_plant.
PERFORM f_check_matnr_in_ekpo.
ENDIF.
IF ( NOT s_date IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
PERFORM f_check_matnr_in_plant.
PERFORM f_check_matnr_in_ekpo.
PERFORM f_check_date_in_eket.
PERFORM f_check_ebeln_in_ekpo.
PERFORM f_check_werks_in_ekpo.
ENDIF.
IF ( NOT p_ebeln IS INITIAL ) AND
( NOT s_date IS INITIAL ) AND
( p_matnr IS INITIAL ).
PERFORM f_check_date_in_eket.
PERFORM f_check_ebeln_in_ekpo.
PERFORM f_check_werks_in_ekpo.
ENDIF.
IF ( NOT p_ebeln IS INITIAL ) AND
( s_date IS INITIAL ) AND
( p_matnr IS INITIAL ).
PERFORM f_check_ebeln_in_ekpo.
PERFORM f_check_werks_in_ekpo.
ENDIF.
del end CR1591
Data selection from Tables *
START-OF-SELECTION.
SET PF-STATUS 'SELECT'.
add begin CR1591
Set ranges tables
PERFORM set_ranges.
add end CR1591
mod begin CR1591
**Selection of PO data from EKET into internal table t_purc.
PERFORM f_select_eket.
**Selection of corresponding PO data for EKET from EKES into t_ekes.
PERFORM f_select_ekes.
**Selection of material desc from MAKT table into T_makt.
PERFORM f_select_makt.
**Copy the contents of t_purc and t_makt into t_eket table.
PERFORM f_move_eket.
**Replace the corresponding entries of t_eket with t_ekes.
PERFORM f_update_eket.
Selection of PO data from EKET into internal table T_EKET.
PERFORM f_select_eket2.
Selection of corresponding PO data from EKES appending to T_EKET.
PERFORM f_select_ekes2.
Selection of material desc from MAKT table into T_MAKT.
PERFORM f_select_makt2.
mod end CR1591
*Selection of vendor product name.
PERFORM f_select_vpnam.
del begin CR1591
No need
**copy t_eket-ebelp into temporary variable.
PERFORM f_copy_ebelp.
del end CR1591
*selection of data from MLGN table into t_mlgn internal table
PERFORM f_select_mlgn.
*selection of data from marm table into t_marm internal table
PERFORM f_select_marm.
*selection of data from marc table into t_marc internal table
PERFORM f_select_marc.
*selection of data from lfa1 table into t_lfa1 internal table
PERFORM f_select_lfa1.
*Selection of data from LIPS table into t_lips internal table
PERFORM f_select_lips.
del begin CR1591
Don't display list screen when no data exists
*END-OF-SELECTION.
del end CR1591
*lines = sy-linno - 1.
*Collection of data into the final display internal table t_Display
PERFORM f_collect_final.
*Display the contents of t_display as a simple List
PERFORM f_list_display.
AT USER-COMMAND.
PERFORM f_select_layout.
INCLUDE zjpmipu315.
INCLUDE zjpmipu316.
*& Form f_check_MATNR_in_plant
This Routine is to check if the the selected material code is
available in the plant 'JP01'.
FORM f_check_matnr_in_plant.
DATA: l_matnr LIKE mara-matnr.
SELECT matnr UP TO 1 ROWS FROM marc
INTO l_matnr
WHERE
matnr = p_matnr AND
werks = c_werks.
ENDSELECT.
IF l_matnr IS INITIAL.
MESSAGE e000 WITH
'The material is not available in '(t02) c_werks 'plant'(t20).
ENDIF.
ENDFORM. " f_check_MATNR_in_plant
*& Form f_check_EBELN_in_EKPO
This Routine is to check if the Purchase order number selected
is existing or not and if it exists, check if it is related to
the plant 'JP01'.
FORM f_check_ebeln_in_ekpo.
DATA: l_ebeln LIKE ekpo-ebeln.
SELECT ebeln UP TO 1 ROWS FROM ekpo
INTO l_ebeln
WHERE
ebeln = p_ebeln AND
werks = c_werks.
ENDSELECT.
IF l_ebeln IS INITIAL.
MESSAGE e000 WITH
'PO not available or not related to '(t03) c_werks 'plant'(t21).
ENDIF.
ENDFORM. " f_check_EBELN_in_EKPO
*& Form f_check_matnr_in_ekko
This routine is to check if any PO exist for the selected
Material code.
FORM f_check_matnr_in_ekpo.
DATA: l_matnr LIKE ekpo-matnr.
SELECT matnr UP TO 1 ROWS FROM ekpo
INTO l_matnr
WHERE
matnr = p_matnr.
ENDSELECT.
IF l_matnr IS INITIAL.
MESSAGE e000 WITH
'PO does not exist for the material no'(t04) p_matnr.
ENDIF.
ENDFORM. " f_check_matnr_in_ekpo
*& Form f_check_date_in_eket
This routine is to check if any purchase order exists
with the selected
FORM f_check_date_in_eket.
DATA: l_eindt LIKE eket-eindt.
SELECT eindt UP TO 1 ROWS FROM eket
INTO l_eindt
WHERE
eindt IN s_date.
ENDSELECT.
IF l_eindt IS INITIAL.
MESSAGE e000 WITH
'No PO exist with the selected delivery date '(t05).
ENDIF.
ENDFORM. " f_check_date_in_eket
*& Form f_check_werks_in_ekpo
This Routine is to check if the selected purchase order
is associated with the plant JP01
FORM f_check_werks_in_ekpo.
DATA: l_ebeln LIKE ekpo-ebeln.
SELECT ebeln UP TO 1 ROWS FROM ekpo
INTO l_ebeln
WHERE
werks = c_werks.
ENDSELECT.
IF l_ebeln IS INITIAL.
MESSAGE e000 WITH
'The selected P0 is not relevant to '(t06) c_werks 'plant'(t22).
ENDIF.
ENDFORM. " f_check_werks_in_ekpo
*& Form f_select_eket
Routine to collect data from EKET, EKPO, MAKT, EKKO tables
using inner join and store the data into internal table
t_PURC. The data selection is based on the selection screen's
input.
FORM f_select_eket.
IF ( NOT s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( NOT s_date-low IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~matnr = p_matnr AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( NOT s_date-low IS INITIAL ) AND
( NOT p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~matnr = p_matnr AND
ekpo~ebeln = p_ebeln AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
ekpo~ebeln = p_ebeln AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ELSEIF ( NOT s_date-low IS INITIAL ) AND
( p_matnr IS INITIAL ) AND
( NOT p_ebeln IS INITIAL ).
SELECT
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO TABLE t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~eindt IN s_date AND
ekpo~ebeln = p_ebeln AND
ekpo~werks = c_werks AND
ekpo~elikz NE c_x AND
ekko~bstyp EQ c_f AND
ekko~bsart NE c_zar.
ENDIF.
IF sy-subrc <> 0.
MESSAGE s000 WITH 'Data not found'(t07).
LEAVE LIST-PROCESSING.
ELSE.
SORT t_purc.
ENDIF.
ENDFORM. " f_select_eket
*& Form f_select_makt
Routine to select the material description for all the
materials present in T_purc table
FORM f_select_makt.
DATA: l_t_makt(4) TYPE c VALUE 'MAKT'.
SELECT
matnr
maktx
FROM
makt
INTO TABLE t_makt
FOR ALL ENTRIES IN t_purc
WHERE
matnr = t_purc-matnr AND
spras = c_spras.
IF sy-subrc <> 0.
MESSAGE s000 WITH
'Relevant data not found in'(t09) l_t_makt 'table'(t23).
ELSE.
SORT t_makt.
ENDIF.
ENDFORM. " f_select_makt
*& Form f_move_eket
Routine to join data in T_PURC and T_MAKT tables into
internal table T_MAKT.
FORM f_move_eket.
LOOP AT t_purc.
t_eket-ebeln = t_purc-ebeln.
t_eket-ebelp = t_purc-ebelp.
t_eket-eindt = t_purc-eindt.
t_eket-menge = t_purc-menge.
t_eket-charg = t_purc-charg.
t_eket-matnr = t_purc-matnr.
t_eket-werks = t_purc-werks.
t_eket-meins = t_purc-meins.
t_eket-lifnr = t_purc-lifnr.
READ TABLE t_makt WITH KEY matnr = t_purc-matnr
BINARY SEARCH.
IF sy-subrc = 0.
t_eket-maktx = t_makt-maktx.
ENDIF.
APPEND t_eket.
CLEAR t_eket.
ENDLOOP.
ENDFORM. " f_move_eket
*& Form f_select_ekes
Routine to select EKES data for all corresponding entries
of T_EKET.
FORM f_select_ekes.
DATA: l_tabix TYPE i.
IF NOT s_date IS INITIAL.
SELECT
ebeln
ebelp
etens
eindt
menge
INTO TABLE t_ekes
FROM
ekes
WHERE
eindt IN s_date.
ELSE.
DESCRIBE TABLE t_purc LINES l_tabix.
IF l_tabix GT 0.
SELECT
ebeln
ebelp
etens
eindt
menge
dabmg
vbeln
vbelp
FROM
ekes
INTO TABLE t_ekes
FOR ALL ENTRIES IN t_eket
FOR ALL ENTRIES IN t_purc
WHERE
ebeln = t_purc-ebeln AND
ebelp = t_purc-ebelp AND
eindt IN s_date.
AND ebeln eq p_ebeln.
and matnr in p_matnr.
ENDIF.
CLEAR l_tabix.
IF NOT s_date IS INITIAL AND NOT p_ebeln IS INITIAL.
SELECT
ekes~ebeln
ekes~ebelp
ekes~etens
ekes~eindt
ekes~menge
ekes~dabmg
APPENDING TABLE t_ekes
FROM ekes
WHERE
eindt IN s_date AND
ebeln EQ p_ebeln AND
ebtyp EQ c_la.
ELSEIF NOT s_date IS INITIAL AND p_ebeln IS INITIAL.
SELECT
ekes~ebeln
ekes~ebelp
ekes~etens
ekes~eindt
ekes~menge
ekes~dabmg
APPENDING TABLE t_ekes
FROM ekes
WHERE
eindt IN s_date AND
ebeln EQ p_ebeln AND
ebtyp EQ c_la.
ELSEIF s_date IS INITIAL AND NOT p_ebeln IS INITIAL.
SELECT
ekes~ebeln
ekes~ebelp
ekes~etens
ekes~eindt
ekes~menge
ekes~dabmg
APPENDING TABLE t_ekes
FROM ekes
WHERE
eindt IN s_date AND
ebeln EQ p_ebeln AND
ebtyp EQ c_la.
ENDIF.
IF sy-subrc = 0.
SORT t_ekes.
ENDIF.
IF NOT t_ekes[] IS INITIAL.
t_ekes_temp[] = t_ekes[].
SORT t_ekes_temp BY ebeln ebelp.
DELETE ADJACENT DUPLICATES FROM t_ekes_temp COMPARING ebeln ebelp.
LOOP AT t_ekes_temp.
READ TABLE t_purc WITH KEY ebeln = t_ekes_temp-ebeln
ebelp = t_ekes_temp-ebelp.
IF sy-subrc NE 0.
CLEAR t_purc.
SELECT SINGLE
eket~ebeln
eket~ebelp
eket~eindt
eket~menge
eket~charg
ekpo~matnr
ekpo~werks
ekpo~meins
ekko~lifnr
INTO CORRESPONDING FIELDS OF t_purc
FROM
( ( eket INNER JOIN ekko ON
eketebeln = ekkoebeln ) INNER JOIN ekpo ON
eketebelp = ekpoebelp AND
ekpoebeln = ekkoebeln )
WHERE
eket~ebeln = t_ekes_temp-ebeln
AND eket~ebelp = t_ekes_temp-ebelp
AND ekpo~elikz NE c_x
AND ekko~bstyp EQ c_f
AND ekko~bsart NE c_zar.
IF sy-subrc EQ 0.
APPEND t_purc.
CLEAR t_purc.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH: t_ekes_temp, t_ekes.
CLEAR: t_ekes_temp, t_ekes.
Once the header is filled up get the details from EKES
SELECT ebeln ebelp etens eindt menge dabmg vbeln vbelp
INTO TABLE t_ekes
FROM ekes
FOR ALL ENTRIES IN t_purc
WHERE ebeln EQ t_purc-ebeln.
Mark the entries as 'X' which falls in the date range
LOOP AT t_ekes.
IF t_ekes-eindt IN s_date.
t_ekes-mark = 'X'.
MODIFY t_ekes INDEX sy-tabix TRANSPORTING mark.
ENDIF.
ENDLOOP.
SORT t_ekes BY ebeln ebelp ASCENDING mark DESCENDING.
Delete the entries from eket if no entries in EKES falls in the period
LOOP AT t_purc.
l_tabix = sy-tabix.
READ TABLE t_ekes WITH KEY ebeln = t_purc-ebeln
ebelp = t_purc-ebelp.
IF sy-subrc EQ 0.
IF t_ekes-mark NE 'X'.
DELETE t_purc INDEX l_tabix.
ENDIF.
ENDIF.
ENDLOOP.
delete the entries from EKES which do not fall in the specified period
DELETE t_ekes WHERE mark NE 'X'.
ENDFORM. " f_select_ekes
*& Form f_update_eket
Routine to substitute relevant t_eket entries with that of
t_ekes entries.It does not modify the remaining entries for
for which the corresponding values in t_ekes doesnot exist.
FORM f_update_eket.
DATA: BEGIN OF lt_temp_eket OCCURS 0,
ebeln LIKE eket-ebeln, "Purchasing Document Number
ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
eindt LIKE eket-eindt, "Item delivery date
menge LIKE eket-menge, "Scheduled quantity
dabmg LIKE ekes-dabmg, " Delivered quantity
matnr LIKE ekpo-matnr, "Material code
maktx LIKE makt-maktx, "Material Description-- jp check
etens LIKE ekes-etens, "Sequence Number
meins LIKE ekpo-meins, "Unit of measure
lifnr LIKE ekko-lifnr, "Vendor number
charg LIKE eket-charg, " Batch number Added by PD 08/08/03
vbeln LIKE ekes-vbeln,
vbelp LIKE ekes-vbelp,
END OF lt_temp_eket,
l_menge LIKE ekes-menge.
LOOP AT t_eket.
LOOP AT t_ekes WHERE ebeln = t_eket-ebeln
AND ebelp = t_eket-ebelp.
Added by PD 08/08/03
MOVE t_eket-charg TO lt_temp_eket-charg.
addition ends
MOVE t_eket-ebeln TO lt_temp_eket-ebeln.
MOVE t_eket-ebelp TO lt_temp_eket-ebelp.
MOVE t_eket-meins TO lt_temp_eket-meins.
CLEAR l_menge.
l_menge = t_ekes-menge - t_ekes-dabmg.
IF l_menge LE 0.
CONTINUE.
ELSE.
MOVE l_menge TO lt_temp_eket-menge.
ENDIF.
MOVE t_ekes-eindt TO lt_temp_eket-eindt.
MOVE t_ekes-etens TO lt_temp_eket-etens.
MOVE t_eket-lifnr TO lt_temp_eket-lifnr.
MOVE t_eket-maktx TO lt_temp_eket-maktx.
MOVE t_eket-matnr TO lt_temp_eket-matnr.
MOVE t_ekes-vbeln TO lt_temp_eket-vbeln.
MOVE t_ekes-vbelp TO lt_temp_eket-vbelp.
APPEND lt_temp_eket.
CLEAR lt_temp_eket.
CLEAR t_ekes.
ENDLOOP.
IF sy-subrc NE 0.
Added by PD 08/08/03
MOVE t_eket-charg TO lt_temp_eket-charg.
addition ends
MOVE t_eket-ebelnDear
Problem No 1 : we are working in a process industries with three plants each of them have three order type. we have define MRP group in "OPPR" then assign each MRP group to Orde types in "OPPE". Now the problem is whn i convert plan order in process order for any material systme automaticaly pick the order type PIi01.
Answer :
1.Please check the OPPR -Plant and MRP group -Select Order Type Button -Check what Order Type you have assinged here ( PI01( May be the default Process Order Type )
2.If you are maintaing MRP group ( 0001 or 0002) , did you asisng the same in MRP1 view ?? because
3.Did you maintain the similar Order type in OPKP -Define Production Scheduling Profile ? -This has highest priority .
4.Did you maintain correct order type in OPJH-Maintain Order Type ??
Refer the expert comments on the same issue : Strategy group to define production order type
Problem No 2: 2nd Problem is system system is not creating plan order for prrevios dates. say i enter PIR for month of november from first november to 30th november and run MRP on 29th the sytem create plan order on 30th of november with exception message 30.
Answer : You can plan the order in back dated , if you maitain Satrt date in the Past optiuon in OPU3/OPU5-Define Scheduling parameters .Goto OPU3 -Select the Order Type -Double click -Maintain 90-60 days in the Start Date in the past in Scheduling Control and Details scheduling tab .
Hope it helps
regards
JH -
Vendor text not visible in SAP R/3
Hello All,
When a purchase order is created in SRM with additional text - ie. Vendor text. ( Either at item or header level) This text is not visible when viewing the purchase order in SAP R/3.Does it not come default ??? i am expecting the text to be reflected In the text tab in the item detail section.
Does it require any BADI or config for the same to reflect in R/3
Regards
~RupeshHi
You can transfer the long text to the backend through the R/3 backend <b>bbp_po_inbound_badi</b>. Your code must be placed in the <b>BBP_MAP_BEFORE_BAPI</b> method.
<u>Use any of the SRM BADIs :</u>
1) BBP_ECS_PO_OUT_BADI
2) BBP_CREATE_BE_PO_NEW
3) BBP_CREATE_PO_BACK
4) BBP_LONGTEXT_BADI
<b>Please go through the links below -></b>
Re: Extended Classic Scenerio and Vendor Text
Re: MM - SUS: transfer text of the purchase order from R/3 to SRM
Do let me know.
Regards
- Atul -
How to get vendor text in PO header?
The requirement is to put vendor text in vendor master (XK03) and in Purchasing screen -> extras->text.
We have a Purchasing Memo as well as a "Purchase Order Text" which i fill up. I require that the "Purchase order text" field value from vendor master should show in the PO header text. But it is not appearing currently.
What could be the issue and how can i activate this?Hi,
Make sure you have maintained the text rules in config.
IMG>MM>Purchasing>PO>Texts-->Copying rules for header texts
Maintain text linkages for header text (or whichever text value you want) with source object being vendor master and source "text purchase order text/memo".
Thanks.
Maybe you are looking for
-
Ipod Nano Setup Assistant does not appear!!!
I am using an HP PC (64 bit)with Windows Vista. I have installed the 64 bit edition of i Tunes, and I have tried EVERYTHING the troubleshooting assistant has suggested (several times) and the "ipod nano setup assistant" fails to appear after I instal
-
How do I fix a black screen iPhone?
My iPhone screen is completely back. I know the phone still works becasue I can still egt phone calls and it still links to itunes. Does anyone know how to fix this problem?
-
Hi Gurus, I am using 10.1.3.4.1... I have a calendar prompt with PS variable "date" and I want to show this variable in Title view subtitle so I wrote like @{date}[MM/DD/YYYY] in subtitle but the date mask is not reflecting ..How to change this date
-
TS3367 Trouble With FaceTime On iPad Mini
I have a new iPad Mini. I have turned on FaceTime in Settings and loaded new contacts who have existing iPads of iPhones. When I try to connect with FaceTime, it gives the message that "FaceTime is turned off in Settings. Do you want to turn it on
-
Ftp uploader for lightroom 3 (mac)???
Does ANYBODY know why there is no SDK package downloader for Mac? How do I get an ftp uploader in Lightroom 3? I know it can be done!