Status close and material components
Hi,
If you have material components in your projects and when you finish your projects you set the project in status "CLOSE".
What happen is that material components no longer are visible in project builder (CJ20N) after setting status "CLOSE".
But if you go through compoent overview you still can see all the material component information but not from the left panel tree as icons in CJ20N.
Do anyone know if this is a setting wich can be done to see the material components as icons in left panel tree, any way, after setting the status close?
Best regards
Jose Marin
José,
When you close the corresponding activity, the material components are flaged for deletion.
If you still want to see them in the structure tree, you must change your PB options in menu Settings > Options. There you will find a flag to make the system display the deleted objects ("Display deleted objects"). Once the flag is set, the system will display the deleted material components in the structure tree highlighted in blue colour.
Hope this clarifies
Rgds
Martina
Similar Messages
-
Business transaction 'Close' sets status 'REJC' and 'ERLD'
Good day everyone!!!
I added a new status "Rejected (REJC) " the behavior is similar to standard "Confirmed(ERLD)" .
(coppied from Confirmed
After this system says:
Business transaction 'Close' sets status 'REJC' and 'ERLD'
Message no. BS292
Diagnosis
You specified in the procedure control of status REJC and status ERLD that both statuses be replaced by the procedure 'Close'. Both statuses have a status number.
System Response
When the procedure 'Close' runs, the System will try to set statuses REJC and ERLD. They cannot be active at the same time because they both have status numbers so the entry is rejected.
Procedure
Delete one of the two statuses
or
give only one of the statuses a status number
or
change the procedure control.
Questions:
1) Is it possible to get rid of this message?
2) if possible, how ?
3) what problems we may have, after doing this ??
Regards
Sindry
Edited by: Sindry on Jan 5, 2011 9:59 AMhmmm seems the problem i got was a bit weird. the first server that I was using was only a Windows 2000 Professional Edition. When I installed both database and OAS in a Windows 2000 Server , I was able to deploy the WAR file properly and no NLS error was displayed. However, I'm still getting the servlet not deployed problem.
I'm getting this in the status display of the WAR File
context Not Loaded Servlet org.springframework.web.context.ContextLoaderServlet 0 0 0 1 -
BOM status change during material replacement
we use CSKB to create an order BOM. within the bom, we do a material replacement for one of the components, so that it's bom can also be modified. At the time of replacement, the material bom has a status of 1, but after copying to the sales order bom, the status is changed to 3. this causes history tracking to turn on for the sales order bom, and we dont want that.
is this change of status configured soemplace?
tiaI have found what i think to be th eproblem. the default bom status is set to 3, which is fine for a material BOM, but it appears it is also being used for the order bom.
so... i decided to implement a method in BOM_UPDATE BADI. I copied some code from another message on this site, as follows:
method if_ex_bom_update~change_at_save.
data: wstko type cs01_stkob.
data: name_tstko(30) value '(SAPLCSBT)O1-STPOB[]'.
field-symbols: <tstko> type table.
assign (name_tstko) to <tstko>.
read table <tstko> into wstko index 1.
if sy-subrc = 0.
* if an order bom at status 03, change it to status 01
if wstko-stlty = 'K' and wstko-stlst = '03'.
wstko-stlst = '01'.
modify <tstko> from wstko index 1.
endif.
endif.
endmethod.
The code compiles and executes fine, but the change is not made. i am guessing it has to do with the value in name_tstko, since that program is not even in my program stack when i save the bom (i put a breakpoint at the assign statement, and ran CSKB. I have tried various values based on the code that IS in my stack, and it simply short dumps, apparently unable to assign the names.
this could potentially fix my status issue (and a couple of other issues) if i can get it to work. any help is appreciated.
dave -
How to find the Open sale orders till date for given plant and material ?
Hi experts,
I have a requirement to calculate the open sale orders for a given plant and material. I have tried in VA05 wherein i can get only for the material and sales area combination. From the document nos obtained from VA05 i can then find the plant. But my question is how do i get the output of VA05 into my progra. (can i use submit for a module pool report ).
Also if ther is some other standard table or Function module to find the open sale orders till a given date ,it will be even more helpful....in which case i can drop the VA05 route.
Kindly help
Thanks in advance
AshwinHi Ashwin,
You can use SAP Tables VBAK and VBUP to get to know if the document is complete or not.
VBUK-GBSTK is the field that will give you the status of the Sales Order .
VBUK is used at header level , whereas VBUP is used for Item level.
So in your case what I would do is :
Get the Sales Orders that satisy the plant and material criteria from VBAP table , take this Sales Document numbers and go to VBUK or VBUP table to get the Sales Order Status.
If I need to find the open quantity as well I will link to VBFA table based on the document number.
Reward if helpful.
Thanks,
Imran -
Replication of Customer and Material master from R/3 to CRM
Hi
Recently in our quality server basis administrator has made a client copy from production server after that customer master and material master are not flowing from R/3 to CRM, even sales orders were not getting copied from CRM to R/3 , i went through C71 BB config document and fixed the sales orders updation from CRM to R/3 but not able to resolve the problem of customer master and material master from ECC to CRM.
I went to B09 BB document and all settings are fine.
Using R3AS I have loaded following objects DNL_CUST_PROD0, PROD1, PROD3, SPROD , DNL_PLANT. and Material.
I went to R3AM1 and checked the status as running or wait for each object.
There are no filters in R3AC1 .
Queue name withR3AD_MATERIA0000000001 has status SYSFAIL in SMQ2 .
What can i do to resolve this problem.
Please advice.
Thanks,
VaishnaviHello Vaishnavi,
After the client copy , have you run txn:BDLS in order to change the LOGSYS in all relevant tables?
You can run this txn in test mode as well to see the affected tables.
Are you getting any dump on these load ?Check it in txn:ST22.
Hope this helps!
Best Regards,
Shanthala Kudva. -
Authorization for material type and material views
Hello all,
I would need to restrict a user group, in creation (MM01) and modification of material master, based of type material and material views.
The authorization, for each user should be:
- view, modify and create of all views, except accounting (B) for type material ZFER;
- view, modify and create of all views for type material ZOFF.
I tried to create 2 roles in PFCG with the following authorization objects:
1) M_MATE_MAR (Material Master: Material Types) ACTVT = *, BEGRU = ZFER and M_MATE_STA (Maintenance Statuses) ACTVT = *, STATM = A,C, D, E, F, G,K, L, P, Q, S, V, X, Z (excluding B)
2) ) M_MATE_MAR ACTVT = *, BEGRU = ZFER and M_MATE_STA ACTVT = *, STATM = B
but the effect is to be authorized, to all view for material type ZFER and ZOFF.
I have already updated the authorization group of the type materials (OMS2).
Is there a solution for this problem?
(component version SAP ECC 6.0)
Thanks.
Regards,
LucaI tried to create 2 roles in PFCG with the following authorization objects: 1) M_MATE_MAR (Material Master: Material Types) ACTVT = *, BEGRU = ZFER and M_MATE_STA (Maintenance Statuses) ACTVT = *, STATM = A,C, D, E, F, G,K, L, P, Q, S, V, X, Z (excluding B) 2) ) M_MATE_MAR ACTVT = *, BEGRU = ZFER and M_MATE_STA ACTVT = *, STATM = B
- Are both these roles assigned to the same user? then your purpose is not solved, It is more or less like giving full authorization.
- One role should be
M_MATE_MAR (Material Master: Material Types) ACTVT = *, BEGRU = ZFER and M_MATE_STA (Maintenance Statuses) ACTVT = *, STATM = A,C, D, E, F, G,K, L, P, Q, S, V, X, Z (excluding B) for view, modify and create of all views, except accounting (B) for type material ZFER. This should be assigned to one user
- Second role should be
M_MATE_MAR ACTVT = *, BEGRU = ZOFF and M_MATE_STA ACTVT = *, STATM = * for view, modify and create of all views for type material ZOFF. This role should be assigned to the second user.
Regards,
Subbu -
PO print OUT And material Document Print Out is coming In English
HI all.
I have Created Vendor In ZH(chinese Language,)and in material master I have maintained description in Chinese language.
I'M taking PO and material Documents print outs in Chinese Server log-in.
even Though Im taking Print outs in Chinese Log-In server, IM getting Print outs in English Language only not In chines language..
At the Time Of PO creation the Communication Language is ZH(Chines)..
I have read some related post even 89899..
But I have not find solution
plz help me.
thanks and regards
ramesh reddy.'Check SAP Note 894444 - Tool for server-based printing on Windows (SAPSprint) for your requirement,
Installation
Before you install SAPSprint, delete SAPLPD manually. To do this, you normally need to completely delete the installation directory only. If you installed SAPLPD as a service using the srvany tool, you can remove the service by calling 'Instsrv SAPLPD remove'.
You can download SAPSprint as a self-extracting executable file from SAP Service Marketplace:
1. Entry by Application Group (on the left)
2. SAP Frontend Components (on the right)
3. SAPSPRINT (on the right)
4. SAPSPRINT <Release> (on the right)
5. SAPSPRINT <Release> (on the right)
6. Win32 (on the right)
Start the program. After you enter the installation path, the system prompts you to enter the TCP/IP port.
Normally, the default setting of 515 is suitable for the port. You should only change this setting if the Windows TCP/IP print service is also running on the computer. The SAPSprint Windows service starts as soon as the installation is over.
We recommend that you set up the following options for the service in the Windows Service Control Manager:
The service should run under a domain user that has the relevant authorizations for the required printers. After the installation, the service runs under "Local system account". This can access locally-defined printers only. You can set the user in the Windows Service Control Manager, in the options of the SAPSprint service.
If you want to delete SAPSprint, you can do so using the normal Windows uninstall tool.
We recommend that you install the SAPSprint service on a separate computer and not together with a SAP system, especially if you use a large number of printers. All printers that SAPSprint uses must be installed on the SAPSprint computer. This applies particularly to released printers from other computers. These should be installed as a queue on the SAPSprint server.
Also note further settings in accordance with Note 1069483.
Settings
You can display the call parameters available for SAPSprint by calling 'sapsprint -?' on the command line. The most important parameters are those that set options, especially log options for troubleshooting.
You can set the log level to 5 by specifying 'sapsprint -oi LogLevel 5'. Immediately after installation, no log level is set up, which means that no log file is created. By setting the log level to 1, 5, or 9, you can ensure that more information is available in the directory that you specified during the installation. A file called sapsprint.dbg and a print job specific file with a variable name are generated. The second file is deleted after successful printing. It is only retained if the printout is recognized as incorrect. If you set the option 'sapsprint -oi KeepFile 1', then both this file and the print file are retained. This is primarily intended for troubleshooting by SAP Support.
All options are case-sensitive. You can display the most important SAPSprint options by calling 'sapsprint -?'. All possible options are described in Note 85469. Normally, the options described there are not necessary - you should use them only in exceptional circumstances. -
BOM and Material Configuration and Sales order..
hi,
in my requirement, i am supposed to create a project automatically based on sales order..
additional requirement is that material components on the project are based on the the selections during the sales order creation
(for example if customer chooses tiles instead of vinyl flooring then materials for tiles will be selected automaticall)
i maintained reference points in my BOM and in the standard network activities.
i also maintained the class and characteristics of the material..
the missing part i believe lies in the dependency being set for the BOM. example:
=if floortype='vinyl' then get BOM_floortype..
how to configure/set up that scenario? i cant seem to find the link between characteristic selection and output of selected BOM.
Thanks in advance.Dear ramesh,
If it possible...can u explain...regarding
(i also maintained the class and characteristics of the material..
the missing part i believe lies in the dependency being set for the BOM. example:
=if floortype='vinyl' then get BOM_floortype..
how to configure/set up that scenario? i cant seem to find the link between characteristic selection and output of selected BOM.)
Regards
chandra -
Documents attached to Material components
Hi friends,
In the project builder, I have the option of attaching documents to the material components and then a PR is generated. Can this document be viewed by the person who is converting this PR to PO? Because I want this document to be viewed by the vendor alongwith the PO released to him.
regards
Pratap.VDear vishnu
Standard SAP provides with a solution for this requirement using PS texts. u can create PS texts specific to the material component and u can transfer to the PR. the following are the steps
1) In the network call up the component overview for a network or activity.
2) Select the components whose PS text you want copy into the purchase requisition.
3) Choose Components -> Copy PS text.
Hope this will solve ur problem.
Regards
Murali -
View labor and material costs in plant maintenance work order
Hi
I am aware we can bring in the costs in the work order through Activity types and assigning the costs to the acitvity type.
Is there anyway we can bring in the actual cost for the work performed by the associate? should we link the work center to HRMS?
Please advise. I need your valuable input for all the points below.
Main points that need to be addressed:
1. Each associate that is capable of confirming hours to a work order needs to be assigned an hourly rate that is reflective of the actual cost for the work performed by this associate. These hours are then tracked through the work order to give a cost for labor assigned to that particular job.
2.Any materials used in the performance of the required task(s) dictated by the work order will be assigned to that order. These materials can be assigned through SAP purchase requisitions, tool crib spot buys, or procurement with a purchase card.
3.Standard reports need to be created so we can track the total maintenance costs for any level of the equipment hierarchy as currently set up in SAP. When this report is created it should show the total maintenace costs for all the levels of the equipment hierarchy broken down into labor cost and material cost. I am using Tcode IW37N and IW40 . Is there any suggestion?Greetings Chandra,
1) You will need to create Work Centres for your associates and create the Activity Types. You can default the Activity Type for each Work Centre and maintain the rate for the activity via t-code KP26 planning.
2) Planned and unplanned Purchase Requisitions for Components with category N will debit the order with material costs. But what do you mean by "tool crib spot buys" and "procurement with a purchase card"? You may need to develop a solution to do such postings to the Order (or for purposes of Cost controlling, manual activity allocation similar to confirming work may be desired such as Manual Activity Allocations via CO transactions (KB21N), unless you can cover that with Purchase Requisitions and POs with "F Order" account assignment.
3) MCI8 Cost Report should be suitable for you, once you set up the Value Categories & Cost Key Figures.
See
PMIS Cost Analysis Reporting Overview
Maintenance Cost Key Figures in MCI3 and MCI8 Reports
PM Order Value categories and costs display -
When I click on some buttons on certain pages of certain websites, there is no response and "javascript:void(0)" is flashed in the status bar; then "Done". When I click on same button on same site/page in IE, it works fine. Have detailed one site/page but this is not the only one. I am not a developer, just a user, so please keep it simple!
Such links usually have an onclick attribute that does the actual action.<br />
Make sure that you do not block [[JavaScript]]
Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") -
SWAP Equipment using IE4N, without serial number and material, it is possible?
Hi PM Experts, I´ve been reading about the way to SWAP equipments from his functional location without using serial number and material, I think if it is not possible, but to be honest, I cannot find any logical answer for it, since equipment number is unique for a plant. Does anyone have found any work around for it?.
I don’t want to use serial numbers and materials, because I think the process is really simple, since the client does not want to implement the refurbishment process. If there is a break down, here is what I do:
Case 1:
Dismantle damage equipment (Say PM01 Order Type)
Install new equipment (same PM order)
TECO the actual PM order
...Later
Case 2:
Create a new PM orden (say PM01 Order Type)
Repair the break equipment
TECO this new PM Order
Here are the inconsistencies:
What happen with the MTTR and MTBR reports?
In case one, I´ll create the material as equipment, while I´m installing, starting date for his master data is the installation day, and the MTTR and MTBR will start to run. This is ok.
What happened in case 2?, I need to stop the “clock” for the MTTR and MTBR of the dismantle equipment.
This is the reason why, I would like to use IE4N, but since there are no serial number and material, I cannot.
Can anyone please suggest a workaround for this scenario?.
I´m thinking in use INAC (Object Deactivated) system status, can this status help me?, Does this status “stops” the clock for MTTR and MTBR report?. If I change the status to ACT, I´ll get the clock back running?.
How about dismantle the equipment?, It will get the AVLB Available status, but the problem is, this equipment will be “floating” in the whole PM structure and I do not want it. I want to have it in a specific Functional Location but with this status, is this possible?. I woul like to use IE4N to SWAP UTs and later change the status to AVLB Available status, with and exits.
I thinking in an Equipment Status and a “Z” MTTR and MTBR report, based on this status. But to be honest, I´d like a standard solution for it.For find my iPhone to work, the device has to be powered on and it has to be connected to a network (Cellular or WiFi). Find My iPhone uses your AppleID as the account to search for. Maybe the "guys" you were talking to were referring to a 3rd party application that essentially lo-jacks your device. But even then, it would still require Power and a network.
I don't believe that there is currently a way to flag a specific serial number for location.
Best of Luck. -
What is procedure for creating new vendor and material master data in ABAP
What is procedure for creating new vendor and material master data in ABAP .
see below code which is used for creation of vendor master as well as extension...
*& Report ZFC_VENDOR_CREATE *
REPORT ZFC_VENDOR_CREATE LINE-SIZE 100
NO STANDARD PAGE HEADING
MESSAGE-ID ZZ.
TABLES
TABLES : SSCRFIELDS. " Fields on selection screens
CONSTANTS
DATA : C_SPLIT TYPE C VALUE '#'. " Used for Has Separator in GUI_UPLAOD
TYPES
Int'table to hold Vendor Master Data
TYPES : BEGIN OF TY_VENDOR_MASTER,
FLAG TYPE C, " Update Flag
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
KTOKK TYPE KTOKK, " Account Group
ANRED TYPE ANRED, " Title
NAME1 TYPE NAME1_GP, " Name1
NAME2 TYPE NAME2_GP, " Name2
SORTL TYPE SORTL, " Search Term 1
SORT2 TYPE AD_SORT2UL, " Search Term 2
STRAS TYPE STRAS_GP, " Street
PSTLZ TYPE PSTLZ, " Postal Code
ORT01 TYPE ORT01_GP, " City
REGIO TYPE REGIO, " Region
LAND1 TYPE LAND1_GP, " Country
SPRAS TYPE SPRAS, " Language
VBUND TYPE RASSC, " Trading Partner
BANKS TYPE BANKS, " Country
BANKL TYPE BANKK, " Bank Key
BANKN TYPE BANKN, " Bank Account
BKONT TYPE BKONT, " Bank Control Key
BANKA TYPE BANKA, " Name of Bank
AKONT TYPE AKONT, " Reconciliation Account
FDGRV TYPE FDGRV, " Cash Management Group
ZTERM TYPE DZTERM, " Payment Terms
REPRF TYPE REPRF, " Check Double Invoice
ZWELS TYPE DZWELS, " Payment Methods
XPORE TYPE XPORE, " Pay all items separately
END OF TY_VENDOR_MASTER,
Int'table to hold Vendor Extend Data
BEGIN OF TY_VENDOR_EXTEND,
FLAG TYPE C, " Update Flag
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
KTOKK TYPE KTOKK, " Account Group
REF_LIFNR TYPE LIFNR, " Reference Vendor Number
REF_BUKRS TYPE BUKRS, " Reference Company Code
AKONT TYPE AKONT, " Reconciliation Account
FDGRV TYPE FDGRV, " Cash Management Group
ZTERM TYPE DZTERM, " Payment Terms
REPRF TYPE REPRF, " Check Double Invoice
ZWELS TYPE DZWELS, " Payment Methods
XPORE TYPE XPORE, " Pay all items separately
END OF TY_VENDOR_EXTEND,
Int'table to hold Error Records Data
BEGIN OF TY_ERROR,
MSG(200) TYPE C, " To hold Message
LIFNR TYPE LIFNR, " Vendor Number
BUKRS TYPE BUKRS, " Company Code
END OF TY_ERROR.
DATA (Simple Fields)
DATA : W_COUNT TYPE I, " Variable to hold count of Records
W_SUCC_REC TYPE I, " No. of Success Records
W_SUCC_REC1 TYPE I, " No. of Updated Records
W_ERR_REC TYPE I, " No. of Error Records
w_noupdate_rec type i. " No. of Records not Changed
INTERNAL TABLES
Int'table to hold uploaded data from File
DATA : IT_VENDOR_MASTER TYPE STANDARD TABLE OF TY_VENDOR_MASTER,
WA_IT_VENDOR_MASTER TYPE TY_VENDOR_MASTER,
IT_VENDOR_EXTEND TYPE STANDARD TABLE OF TY_VENDOR_EXTEND,
WA_IT_VENDOR_EXTEND TYPE TY_VENDOR_EXTEND,
WA_IT_BDCDATA TYPE BDCDATA,
IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA,
WA_IT_MESSTAB TYPE BDCMSGCOLL,
IT_MESSTAB TYPE STANDARD TABLE OF BDCMSGCOLL,
IT_ERROR TYPE STANDARD TABLE OF TY_ERROR,
WA_IT_ERROR TYPE TY_ERROR,
it_error_fk01 type standard table of ty_error,
wa_it_error_fk01 type ty_error,
it_error_fk02 type standard table of ty_error,
wa_it_error_fk02 type ty_error,
it_succ_rec1 type standard table of ty_error,
wa_it_succ_rec1 type ty_error,
it_noupdate type standard table of ty_error,
wa_it_noupdate type ty_error.
FLAGS
DATA : FL_FLAG1 TYPE C, " Flag to check error upload file
FL_FLAG2 TYPE C, " Flag to hold value
FL_FLAG3 TYPE C, " Flag to hold value
FL_FLAG4 TYPE C. " Flag to hold value
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-001,
POSITION POS_LOW.
PARAMETERS : P_FILE(128) DEFAULT 'C:\UPLOAD.TXT' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-002,
POSITION POS_LOW.
PARAMETERS : P_VENMAS RADIOBUTTON GROUP R1 DEFAULT 'X'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-003,
POSITION POS_LOW.
PARAMETERS : P_VENEXT RADIOBUTTON GROUP R1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-004,
POSITION POS_LOW.
PARAMETERS : P_MODE(1) DEFAULT 'N'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-005,
POSITION POS_LOW.
PARAMETERS : P_GROUP(12) DEFAULT 'ZFC_VENDOR_C' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE,
COMMENT 1(30) TEXT-016,
POSITION POS_LOW.
PARAMETERS : P_GROUP1(12) DEFAULT 'ZFC_VENDOR_U' OBLIGATORY.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
Form to get file path for upload of data
PERFORM GET_FILE_PATH.
AT SELECTION-SCREEN ON BLOCK B1.
Form to Validate data specified on Selection Screen
CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.
PERFORM VALIDATE_DATA.
START - OF - SELECTION
START-OF-SELECTION.
IF P_VENMAS = 'X'.
Form to upload data from Presentation Server for Vendor Master
PERFORM UPLOAD_DATA TABLES IT_VENDOR_MASTER.
IF FL_FLAG1 NE 'X'.
SORT IT_VENDOR_MASTER BY LIFNR BUKRS KTOKK.
DELETE IT_VENDOR_MASTER WHERE LIFNR = ' '
AND BUKRS = ' '
AND KTOKK = ' '.
Form to process data for Vendor Master
PERFORM INSERT_VENDOR_MASTER_DATA.
ENDIF.
ELSEIF P_VENEXT = 'X'.
Form to upload data from Presentation Server for Vendor Extend
PERFORM UPLOAD_DATA TABLES IT_VENDOR_EXTEND.
IF FL_FLAG1 NE 'X'.
SORT IT_VENDOR_EXTEND BY LIFNR BUKRS KTOKK.
DELETE IT_VENDOR_EXTEND WHERE LIFNR = ' '
AND BUKRS = ' '
AND KTOKK = ' '.
Form to process data for Vendor Master
PERFORM CHK_AND_INS_VENDOR_EXTEND_DATA.
ENDIF.
ENDIF.
END - OF - SELECTION
END-OF-SELECTION.
IF FL_FLAG1 NE 'X'.
FORMAT COLOR 7.
WRITE:/2 TEXT-O01. " Total Number of records read :
FORMAT COLOR OFF.
WRITE:40 W_COUNT.
FORMAT COLOR 7.
WRITE:/2 TEXT-O02. " Total Number of Success records :
FORMAT COLOR OFF.
WRITE:40 W_SUCC_REC.
FORMAT COLOR 7.
WRITE:/2 TEXT-O07. " Total Number of Updated records :
FORMAT COLOR OFF.
WRITE:40 W_SUCC_REC1.
FORMAT COLOR 7.
WRITE:/2 TEXT-O08. " Total Number of Unchanged records :
FORMAT COLOR OFF.
WRITE:40 W_noupdate_REC.
FORMAT COLOR 7.
WRITE:/2 TEXT-O03. " Total Number of Error records :
FORMAT COLOR OFF.
WRITE:40 W_ERR_REC.
if not it_succ_rec1 is initial.
skip 1.
perform display_changed_report.
endif.
if not it_noupdate is initial.
skip 1.
perform display_nochange_report.
endif.
IF NOT IT_ERROR IS INITIAL.
SKIP 3.
Form to display error data
PERFORM DISPLAY_ERROR_REPORT.
ENDIF.
IF FL_FLAG2 = 'X'.
SKIP 2.
FORMAT COLOR 4.
WRITE:/2 TEXT-O04. " BDC Session Name for Creation (FK01) :
FORMAT COLOR OFF.
WRITE:40 P_GROUP.
perform display_error_report_fk01.
ENDIF.
IF FL_FLAG3 = 'X'.
SKIP 2.
FORMAT COLOR 4.
WRITE:/2 TEXT-O09. " BDC Session Name for Updation (FK02) :
FORMAT COLOR OFF.
WRITE:40 P_GROUP1.
perform display_error_report_fk02.
ENDIF.
ENDIF.
*& Form GET_FILE_PATH
This form is used to get the specified path for uploading of data from
flat file with the help of F4 function key
FORM GET_FILE_PATH .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE.
ENDFORM. " GET_FILE_PATH
*& Form VALIDATE_DATA
This form is used to validate the data given by user on the Selection
Screen and the appropriate message is been displayed when an wrong
entry is inputted
FORM VALIDATE_DATA .
IF SY-BATCH EQ 'X'.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E001(ZZ) WITH TEXT-011.
" Excel file not to be used in Batch Mode
ENDIF.
IF P_MODE NE 'A' AND P_MODE NE 'N' AND P_MODE NE 'E'.
MESSAGE E001(ZZ) WITH TEXT-012.
" Session Mode should be either A or N or E
ENDIF.
ENDFORM. " VALIDATE_DATA
*& Form UPLOAD_DATA
This form is used to upload data from Presentation Server for either
Vendor Master or Vendor Extend
FORM UPLOAD_DATA TABLES P_IT_VENDOR.
DATA : L_FILENAME TYPE STRING,
L_FILETYPE TYPE CHAR10 VALUE 'ASC',
L_HEADER_LENGTH TYPE I VALUE 0,
L_READ_BY_LINE TYPE CHAR01 VALUE 'X'.
MOVE P_FILE TO L_FILENAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_FILENAME
FILETYPE = L_FILETYPE
HEADER_LENGTH = L_HEADER_LENGTH
READ_BY_LINE = L_READ_BY_LINE
HAS_FIELD_SEPARATOR = C_SPLIT
TABLES
DATA_TAB = P_IT_VENDOR
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE I001(ZZ) WITH TEXT-006 L_FILENAME.
MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
FL_FLAG1 = 'X'.
ELSEIF P_IT_VENDOR[] IS INITIAL.
MESSAGE I001(ZZ) WITH TEXT-014. " Uploaded File contains no data
FL_FLAG1 = 'X'.
ENDIF.
ENDFORM. " UPLOAD_DATA
*& Form INSERT_VENDOR_MASTER_DATA
This form is used to process BDC data for Vendor Master
FORM INSERT_VENDOR_MASTER_DATA .
DATA : L_LIFNR TYPE LIFNR.
CLEAR : L_LIFNR.
sort it_vendor_master by flag.
LOOP AT IT_VENDOR_MASTER INTO WA_IT_VENDOR_MASTER.
W_COUNT = W_COUNT + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_MASTER-LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_MASTER-LIFNR.
if wa_it_vendor_master-flag = 'A'.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_MASTER-LIFNR
AND BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
IF SY-SUBRC EQ 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
WA_IT_ERROR-MSG = TEXT-015.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_MASTER.
PERFORM CALL_TRANSACTION.
ENDIF.
CLEAR : WA_IT_VENDOR_MASTER.
elseif wa_it_vendor_master-flag = 'C'.
IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
PERFORM CLOSE_BDC_SESSION.
fl_flag4 = 'X'.
ENDIF.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_MASTER.
PERFORM CALL_TRANSACTION_FK02.
CLEAR : WA_IT_VENDOR_MASTER.
elseif wa_it_vendor_master-flag = 'N'.
WA_IT_noupdate-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_noupdate-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
WA_IT_noupdate-MSG = TEXT-018.
APPEND WA_IT_noupdate TO IT_noupdate.
W_noupdate_REC = W_noupdate_REC + 1.
CLEAR : WA_IT_noupdate, WA_IT_VENDOR_MASTER.
endif.
ENDLOOP.
IF FL_FLAG3 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
ENDFORM. " INSERT_VENDOR_MASTER_DATA
*& Form POPULATE_BDC_DATA_VEN_MASTER
This form is used to populate BDC data of Vendor Master
FORM POPULATE_BDC_DATA_VEN_MASTER .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_MASTER-ZTERM
IMPORTING
OUTPUT = WA_IT_VENDOR_MASTER-ZTERM.
IF WA_IT_VENDOR_MASTER-REPRF = 'Y'.
WA_IT_VENDOR_MASTER-REPRF = 'X'.
ENDIF.
IF WA_IT_VENDOR_MASTER-XPORE = 'Y'.
WA_IT_VENDOR_MASTER-XPORE = 'X'.
ENDIF.
if wa_it_vendor_master-flag = 'A'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
BDC_FIELD USING 'RF02K-KTOKK' WA_IT_VENDOR_MASTER-KTOKK,
BDC_FIELD USING 'BDC_OKCODE' '/00'.
elseif wa_it_vendor_master-flag = 'C'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_MASTER-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_MASTER-BUKRS,
BDC_FIELD USING 'BDC_OKCODE' '=MALL',
BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-D0110' 'X',
BDC_FIELD USING 'RF02K-D0120' 'X',
BDC_FIELD USING 'RF02K-D0130' 'X',
BDC_FIELD USING 'RF02K-D0210' 'X',
BDC_FIELD USING 'RF02K-D0215' 'X',
BDC_FIELD USING 'RF02K-D0220' 'X',
BDC_FIELD USING 'BDC_OKCODE' '/00'.
endif.
perform :BDC_DYNPRO USING 'SAPMF02K' '0110',
BDC_FIELD USING 'LFA1-ANRED' WA_IT_VENDOR_MASTER-ANRED,
BDC_FIELD USING 'LFA1-NAME1' WA_IT_VENDOR_MASTER-NAME1,
BDC_FIELD USING 'LFA1-NAME2' WA_IT_VENDOR_MASTER-NAME2,
BDC_FIELD USING 'LFA1-SORTL' WA_IT_VENDOR_MASTER-SORTL,
BDC_FIELD USING 'LFA1-STRAS' WA_IT_VENDOR_MASTER-STRAS,
BDC_FIELD USING 'LFA1-ORT01' WA_IT_VENDOR_MASTER-ORT01,
BDC_FIELD USING 'LFA1-PSTLZ' WA_IT_VENDOR_MASTER-PSTLZ,
BDC_FIELD USING 'LFA1-LAND1' WA_IT_VENDOR_MASTER-LAND1,
BDC_FIELD USING 'LFA1-REGIO' WA_IT_VENDOR_MASTER-REGIO,
BDC_FIELD USING 'LFA1-SPRAS' WA_IT_VENDOR_MASTER-SPRAS,
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_DYNPRO USING 'SAPMF02K' '0120',
BDC_FIELD USING 'LFA1-VBUND' WA_IT_VENDOR_MASTER-VBUND,
BDC_FIELD USING 'BDC_OKCODE' '/00',
BDC_DYNPRO USING 'SAPMF02K' '0130',
BDC_FIELD USING 'LFBK-BANKS(01)' WA_IT_VENDOR_MASTER-BANKS,
BDC_FIELD USING 'LFBK-BANKL(01)' WA_IT_VENDOR_MASTER-BANKL,
BDC_FIELD USING 'LFBK-BANKN(01)' WA_IT_VENDOR_MASTER-BANKN,
BDC_FIELD USING 'BDC_OKCODE' '=BANK',
BDC_DYNPRO USING 'SAPLBANK' '0100',
BDC_FIELD USING 'BNKA-BANKA' WA_IT_VENDOR_MASTER-BANKA,
BDC_FIELD USING 'BDC_OKCODE' '=ENTR',
BDC_DYNPRO USING 'SAPMF02K' '0130',
BDC_FIELD USING 'BDC_OKCODE' '=ENTR',
BDC_DYNPRO USING 'SAPMF02K' '0210',
BDC_FIELD USING 'LFB1-AKONT' WA_IT_VENDOR_MASTER-AKONT,
BDC_FIELD USING 'LFB1-FDGRV' WA_IT_VENDOR_MASTER-FDGRV,
BDC_FIELD USING 'BDC_OKCODE' '=/00',
BDC_DYNPRO USING 'SAPMF02K' '0215',
BDC_FIELD USING 'LFB1-ZTERM' WA_IT_VENDOR_MASTER-ZTERM,
BDC_FIELD USING 'LFB1-REPRF' WA_IT_VENDOR_MASTER-REPRF,
BDC_FIELD USING 'LFB1-ZWELS' WA_IT_VENDOR_MASTER-ZWELS,
BDC_FIELD USING 'LFB1-XPORE' WA_IT_VENDOR_MASTER-XPORE,
BDC_FIELD USING 'BDC_OKCODE' '=UPDA'.
ENDFORM. " POPULATE_BDC_DATA_VEN_MASTER
*& Form BDC_DYNPRO
This form is used to move data to BDCDATA int'table
FORM BDC_DYNPRO USING PROGRAM TYPE BDC_PROG
DYNPRO TYPE BDC_DYNR.
CLEAR WA_IT_BDCDATA.
WA_IT_BDCDATA-PROGRAM = PROGRAM.
WA_IT_BDCDATA-DYNPRO = DYNPRO.
WA_IT_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_IT_BDCDATA TO IT_BDCDATA.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
This form is used to move data to BDCDATA int'table
FORM BDC_FIELD USING FNAM TYPE ANY
FVAL TYPE ANY.
CLEAR WA_IT_BDCDATA.
WA_IT_BDCDATA-FNAM = FNAM.
WA_IT_BDCDATA-FVAL = FVAL.
APPEND WA_IT_BDCDATA TO IT_BDCDATA.
ENDFORM. " BDC_FIELD
*& Form CALL_TRANSACTION
This form is used to Call FK01 for processing of data either for
Vendor Master or Vendor Extend. The error records are inserted to
Session which can be processed using SM35
FORM CALL_TRANSACTION .
DATA : L_OPTION TYPE CTU_PARAMS,
L_SUBRC TYPE SYSUBRC.
REFRESH IT_MESSTAB.
CLEAR IT_MESSTAB.
L_OPTION-DEFSIZE = 'X'.
L_OPTION-DISMODE = P_MODE.
L_OPTION-UPDMODE = 'S'.
CALL TRANSACTION 'FK01'
USING IT_BDCDATA
MESSAGES INTO IT_MESSTAB
OPTIONS FROM L_OPTION.
L_SUBRC = SY-SUBRC.
IF L_SUBRC = 0.
W_SUCC_REC = W_SUCC_REC + 1.
ELSE.
IF FL_FLAG2 NE 'X'.
PERFORM OPEN_BDC_SESSION.
FL_FLAG2 = 'X'.
ENDIF.
PERFORM BDC_INSERT.
W_ERR_REC = W_ERR_REC + 1.
PERFORM ERROR_RECORD_DATA.
ENDIF.
ENDFORM. " CALL_TRANSACTION
*& Form OPEN_BDC_SESSION
Form used to open session for Error out Records
FORM OPEN_BDC_SESSION .
DATA : L_USERID TYPE APQ_MAPN, " Variable to hold user-id
L_GROUP TYPE APQ_GRPN. " Variable to hold value
MOVE P_GROUP TO L_GROUP.
MOVE SY-UNAME TO L_USERID.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = L_GROUP
KEEP = SPACE
USER = L_USERID
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-008. " Unable to open BDC Session
ENDIF.
ENDFORM. " OPEN_BDC_SESSION
*& Form BDC_INSERT
This form is used to insert error records to a Session method
FORM BDC_INSERT .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FK01'
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-009. " Unable to Insert Data to BDC Session
ENDIF.
ENDFORM. " BDC_INSERT
*& Form ERROR_RECORD_DATA
This form is used to process the messages for the error records which
will be displayed on the output report
FORM ERROR_RECORD_DATA .
DATA : L_LINES TYPE I,
L_MSG(200) TYPE C.
DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
IF SY-SUBRC = 0.
CLEAR L_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_IT_MESSTAB-MSGID
LANG = SY-LANGU
NO = WA_IT_MESSTAB-MSGNR
V1 = WA_IT_MESSTAB-MSGV1
V2 = WA_IT_MESSTAB-MSGV2
V3 = WA_IT_MESSTAB-MSGV3
V4 = WA_IT_MESSTAB-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WA_IT_ERROR_fk01-MSG = L_MSG.
ENDIF.
IF P_VENMAS = 'X'.
WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_ERROR_fk01-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR_fk01-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_ERROR_fk01 TO IT_ERROR_fk01.
CLEAR WA_IT_ERROR_fk01.
ENDIF.
ENDFORM. " ERROR_RECORD_DATA
*& Form CLOSE_BDC_SESSION
Form used to close session of the Error Records
FORM CLOSE_BDC_SESSION .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-010. " Unable to Close BDC Session
ENDIF.
ENDFORM. " CLOSE_BDC_SESSION
*& Form CHK_AND_INS_VENDOR_EXTEND_DATA
This form is used to process BDC data for Vendor Extend
FORM CHK_AND_INS_VENDOR_EXTEND_DATA .
DATA : L_LIFNR TYPE LIFNR.
CLEAR : L_LIFNR, fl_flag4.
sort it_vendor_extend by flag.
LOOP AT IT_VENDOR_EXTEND INTO WA_IT_VENDOR_EXTEND.
W_COUNT = W_COUNT + 1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-REF_LIFNR.
if wa_it_vendor_extend-flag = 'A'.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR
AND BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
IF SY-SUBRC NE 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-REF_LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-REF_BUKRS.
WA_IT_ERROR-MSG = TEXT-007.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-LIFNR
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-LIFNR.
SELECT SINGLE LIFNR
FROM LFB1
INTO L_LIFNR
WHERE LIFNR = WA_IT_VENDOR_EXTEND-LIFNR
AND BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
IF SY-SUBRC EQ 0.
WA_IT_ERROR-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
WA_IT_ERROR-MSG = TEXT-015.
APPEND WA_IT_ERROR TO IT_ERROR.
W_ERR_REC = W_ERR_REC + 1.
CLEAR : WA_IT_ERROR, L_LIFNR.
ELSE.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_EXTEND.
PERFORM CALL_TRANSACTION.
ENDIF.
ENDIF.
CLEAR : WA_IT_VENDOR_EXTEND.
elseif wa_it_vendor_extend-flag = 'C'.
IF FL_FLAG2 = 'X' and fl_flag4 ne 'X'.
PERFORM CLOSE_BDC_SESSION.
fl_flag4 = 'X'.
ENDIF.
REFRESH IT_BDCDATA.
CLEAR IT_BDCDATA.
PERFORM POPULATE_BDC_DATA_VEN_extend.
PERFORM CALL_TRANSACTION_FK02.
CLEAR : WA_IT_VENDOR_EXTEND.
elseif wa_it_vendor_extend-flag = 'N'.
WA_IT_noupdate-LIFNR = WA_IT_VENDOR_extend-LIFNR.
WA_IT_noupdate-BUKRS = WA_IT_VENDOR_extend-BUKRS.
WA_IT_noupdate-MSG = TEXT-019.
APPEND WA_IT_noupdate TO IT_noupdate.
W_noupdate_REC = W_noupdate_REC + 1.
CLEAR : WA_IT_noupdate, WA_IT_VENDOR_EXTEND.
endif.
ENDLOOP.
IF FL_FLAG2 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
if fl_flag3 = 'X'.
PERFORM CLOSE_BDC_SESSION.
ENDIF.
ENDFORM. " CHK_AND_INS_VENDOR_EXTEND_DATA
*& Form POPULATE_BDC_DATA_VEN_EXTEND
This form is used to populate BDC data of Vendor Extend
FORM POPULATE_BDC_DATA_VEN_EXTEND .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_IT_VENDOR_EXTEND-ZTERM
IMPORTING
OUTPUT = WA_IT_VENDOR_EXTEND-ZTERM.
IF WA_IT_VENDOR_EXTEND-REPRF = 'Y'.
WA_IT_VENDOR_EXTEND-REPRF = 'X'.
ENDIF.
IF WA_IT_VENDOR_extend-XPORE = 'Y'.
WA_IT_VENDOR_extend-XPORE = 'X'.
ENDIF.
if wa_it_vendor_extend-flag = 'A'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0105',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_EXTEND-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_EXTEND-BUKRS,
BDC_FIELD USING 'RF02K-KTOKK' WA_IT_VENDOR_EXTEND-KTOKK,
BDC_FIELD USING 'RF02K-REF_LIFNR'
WA_IT_VENDOR_EXTEND-REF_LIFNR,
BDC_FIELD USING 'RF02K-REF_BUKRS'
WA_IT_VENDOR_EXTEND-REF_BUKRS,
BDC_FIELD USING 'BDC_OKCODE' '/00'.
elseif wa_it_vendor_extend-flag = 'C'.
PERFORM :BDC_DYNPRO USING 'SAPMF02K' '0106',
BDC_FIELD USING 'RF02K-LIFNR' WA_IT_VENDOR_extend-LIFNR,
BDC_FIELD USING 'RF02K-BUKRS' WA_IT_VENDOR_extend-BUKRS,
BDC_FIELD USING 'RF02K-D0210' 'X',
BDC_FIELD USING 'RF02K-D0215' 'X',
BDC_FIELD USING 'BDC_OKCODE' '/00'.
endif.
perform :BDC_DYNPRO USING 'SAPMF02K' '0210',
BDC_FIELD USING 'LFB1-AKONT' WA_IT_VENDOR_EXTEND-AKONT,
BDC_FIELD USING 'LFB1-FDGRV' WA_IT_VENDOR_EXTEND-FDGRV,
BDC_FIELD USING 'BDC_OKCODE' '=/00',
BDC_DYNPRO USING 'SAPMF02K' '0215',
BDC_FIELD USING 'LFB1-ZTERM' WA_IT_VENDOR_EXTEND-ZTERM,
BDC_FIELD USING 'LFB1-REPRF' WA_IT_VENDOR_EXTEND-REPRF,
BDC_FIELD USING 'LFB1-ZWELS' WA_IT_VENDOR_EXTEND-ZWELS,
BDC_FIELD USING 'LFB1-XPORE' WA_IT_VENDOR_extend-XPORE,
BDC_FIELD USING 'BDC_OKCODE' '=UPDA'.
ENDFORM. " POPULATE_BDC_DATA_VEN_EXTEND
*& Form DISPLAY_ERROR_REPORT
This form is used to display the error records on the output screen
FORM DISPLAY_ERROR_REPORT .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O05. " Error List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O06. " Error List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H03, " Error Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_ERROR INTO WA_IT_ERROR.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_ERROR-LIFNR,
17 SY-VLINE,
18 WA_IT_ERROR-BUKRS,
31 SY-VLINE,
32 WA_IT_ERROR-MSG,
100 SY-VLINE.
CLEAR : WA_IT_ERROR.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
ENDFORM. " DISPLAY_ERROR_REPORT
*& Form CALL_TRANSACTION_FK02
Form used to Call Transaction FK02
form CALL_TRANSACTION_FK02 .
DATA : L_OPTION TYPE CTU_PARAMS,
L_SUBRC TYPE SYSUBRC.
REFRESH IT_MESSTAB.
CLEAR IT_MESSTAB.
L_OPTION-DEFSIZE = 'X'.
L_OPTION-DISMODE = P_MODE.
L_OPTION-UPDMODE = 'S'.
CALL TRANSACTION 'FK02'
USING IT_BDCDATA
MESSAGES INTO IT_MESSTAB
OPTIONS FROM L_OPTION.
L_SUBRC = SY-SUBRC.
IF L_SUBRC = 0.
W_SUCC_REC1 = W_SUCC_REC1 + 1.
WA_IT_succ_rec1-MSG = Text-017.
IF P_VENMAS = 'X'.
WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_succ_rec1-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_succ_rec1-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_succ_rec1 TO IT_succ_rec1.
ELSE.
IF FL_FLAG3 NE 'X'.
PERFORM OPEN_BDC_SESSION_fk02.
FL_FLAG3 = 'X'.
ENDIF.
PERFORM BDC_INSERT_fk02.
W_ERR_REC = W_ERR_REC + 1.
PERFORM ERROR_RECORD_DATA1.
ENDIF.
endform. " CALL_TRANSACTION_FK02
*& Form OPEN_BDC_SESSION_fk02
Form used to Open session for FK02
form OPEN_BDC_SESSION_fk02 .
DATA : L_USERID TYPE APQ_MAPN, " Variable to hold user-id
L_GROUP TYPE APQ_GRPN. " Variable to hold value
MOVE P_GROUP1 TO L_GROUP.
MOVE SY-UNAME TO L_USERID.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = L_GROUP
KEEP = SPACE
USER = L_USERID
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-008. " Unable to open BDC Session
ENDIF.
endform. " OPEN_BDC_SESSION_fk02
*& Form BDC_INSERT_fk02
Form used to insert data into BDC session using FK02
form BDC_INSERT_fk02 .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FK02'
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
WRITE:/ TEXT-009. " Unable to Insert Data to BDC Session
ENDIF.
endform. " BDC_INSERT_fk02
*& Form display_changed_report
Form to display Updated Vendor data
form display_changed_report .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O10. " Updated List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O11. " Updated List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_succ_rec1 INTO WA_IT_succ_rec1.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_succ_rec1-LIFNR,
17 SY-VLINE,
18 WA_IT_succ_rec1-BUKRS,
31 SY-VLINE,
32 WA_IT_succ_rec1-MSG,
100 SY-VLINE.
CLEAR : WA_IT_succ_rec1.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_changed_report
*& Form display_nochange_report
Form to display No Changed data for Vendors
form display_nochange_report .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O12. " No Changes List for Vendor Master
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O13. " No Changes List for Vendor Master Extended
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_noupdate INTO WA_IT_noupdate.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_noupdate-LIFNR,
17 SY-VLINE,
18 WA_IT_noupdate-BUKRS,
31 SY-VLINE,
32 WA_IT_noupdate-MSG,
100 SY-VLINE.
CLEAR : WA_IT_noupdate.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_nochange_report
*& Form ERROR_RECORD_DATA1
Form to get Error Message for Changed Vendors
form ERROR_RECORD_DATA1 .
DATA : L_LINES TYPE I,
L_MSG(200) TYPE C.
DESCRIBE TABLE IT_MESSTAB LINES L_LINES.
READ TABLE IT_MESSTAB INTO WA_IT_MESSTAB INDEX L_LINES.
IF SY-SUBRC = 0.
CLEAR L_MSG.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_IT_MESSTAB-MSGID
LANG = SY-LANGU
NO = WA_IT_MESSTAB-MSGNR
V1 = WA_IT_MESSTAB-MSGV1
V2 = WA_IT_MESSTAB-MSGV2
V3 = WA_IT_MESSTAB-MSGV3
V4 = WA_IT_MESSTAB-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WA_IT_ERROR_fk02-MSG = L_MSG.
ENDIF.
IF P_VENMAS = 'X'.
WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_MASTER-LIFNR.
WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_MASTER-BUKRS.
ELSEIF P_VENEXT = 'X'.
WA_IT_ERROR_fk02-LIFNR = WA_IT_VENDOR_EXTEND-LIFNR.
WA_IT_ERROR_fk02-BUKRS = WA_IT_VENDOR_EXTEND-BUKRS.
ENDIF.
APPEND WA_IT_ERROR_fk02 TO IT_ERROR_fk02.
CLEAR WA_IT_ERROR_fk02.
ENDIF.
endform. " ERROR_RECORD_DATA1
*& Form display_error_report_fk01
Form to display Error Report for Master Vendors (FK01)
form display_error_report_fk01 .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O05. " Error List for Vendor Master (FK01)
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O06. " Error List for Vendor Master Extended (FK01)
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number
17 SY-VLINE,
18 TEXT-H02, " Company Code
31 SY-VLINE,
32 TEXT-H04, " Message
100 SY-VLINE.
FORMAT COLOR OFF.
WRITE:/ SY-ULINE(100).
LOOP AT IT_ERROR_fk01 INTO WA_IT_ERROR_fk01.
FORMAT COLOR 2.
WRITE:/1 SY-VLINE,
2 WA_IT_ERROR_fk01-LIFNR,
17 SY-VLINE,
18 WA_IT_ERROR_fk01-BUKRS,
31 SY-VLINE,
32 WA_IT_ERROR_fk01-MSG,
100 SY-VLINE.
CLEAR : WA_IT_ERROR_fk01.
FORMAT COLOR OFF.
ENDLOOP.
WRITE:/ SY-ULINE(100).
endform. " display_error_report_fk01
*& Form display_error_report_fk02
Form to display Error Report for changed Vendors (FK02)
form display_error_report_fk02 .
IF P_VENMAS = 'X'.
WRITE:/ TEXT-O14. " Error List for Vendor Master (FK02)
ELSEIF P_VENEXT = 'X'.
WRITE:/ TEXT-O15. " Error List for Vendor Master Extended (FK02)
ENDIF.
WRITE:/ SY-ULINE(100).
FORMAT COLOR 1.
WRITE:/1 SY-VLINE,
2 TEXT-H01, " Vendor Number -
I've just updated OS to 10.10.1 and Finder keeps trying to open and then closes every 2 seconds with the message Finder is not Available. If Safari is opened with the window full screen it immediately closes and will only work with window smaller than maximum. Driving me mad! Any help please!!
Hi Linc
Thank you for your response.
I'm a bit of an amateur so I hope below is the information you've asked for:
Step 1
23/11/2014 09:19:14.007 ReportCrash[294]: Saved crash report for Finder[4349] version 10.10.1 (10.10.1) to /Users/AAAA/Library/Logs/DiagnosticReports/Finder_2014-11-23-091914_BBBB-MacBoo k-Pro-2.crash
23/11/2014 09:19:14.008 ReportCrash[294]: Removing excessive log: file:///Users/AAAA/Library/Logs/DiagnosticReports/Finder_2014-11-23-091840_BBBB -MacBook-Pro-2.crash
23/11/2014 09:19:14.000 kernel[0]: CODE SIGNING: cs_invalid_page(0x103809000): p=4357[Finder] final status 0x3000a00, denying page sending SIGKILL
23/11/2014 09:19:14.000 kernel[0]: CODE SIGNING: process 4357[Finder]: rejecting invalid page at address 0x103809000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
23/11/2014 09:19:14.454 com.apple.xpc.launchd[1]: (com.apple.Finder[4357]) Binary is improperly signed.
23/11/2014 09:19:14.454 com.apple.xpc.launchd[1]: (com.apple.Finder) Service only ran for 0 seconds. Pushing respawn out by 1 seconds.
23/11/2014 09:19:15.584 Finder[4359]: assertion failed: 14B25: libxpc.dylib + 97940 [9437C02E-A07B-38C8-91CB-299FAA63083D]: 0x89
23/11/2014 09:19:15.000 kernel[0]: CODE SIGNING: cs_invalid_page(0x10bfbf000): p=4359[Finder] final status 0x3000a00, denying page sending SIGKILL
23/11/2014 09:19:15.000 kernel[0]: CODE SIGNING: process 4359[Finder]: rejecting invalid page at address 0x10bfbf000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
Step 2
Process: Finder [4626]
Path: /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
Identifier: com.apple.finder
Build Info: Finder_FE-932001003000000~1
Responsible: Finder [4626]
PlugIn Path: /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
PlugIn Identifier: com.apple.finder
-0 sec CODE SIGNING: cs_invalid_page(0x10c9a5000): p=4626[Finder] final status 0x3000a00, denying page sending SIGKILL
-0 sec CODE SIGNING: process 4626[Finder]: rejecting invalid page at address 0x10c9a5000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
-2 sec CODE SIGNING: cs_invalid_page(0x10c5b3000): p=4624[Finder] final status 0x3000a00, denying page sending SIGKILL
-2 sec CODE SIGNING: process 4624[Finder]: rejecting invalid page at address 0x10c5b3000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
-3 sec CODE SIGNING: cs_invalid_page(0x10f4bd000): p=4622[Finder] final status 0x3000a00, denying page sending SIGKILL
-3 sec CODE SIGNING: process 4622[Finder]: rejecting invalid page at address 0x10f4bd000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
-5 sec CODE SIGNING: cs_invalid_page(0x105ecf000): p=4620[Finder] final status 0x3000a00, denying page sending SIGKILL
-5 sec CODE SIGNING: process 4620[Finder]: rejecting invalid page at address 0x105ecf000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
-7 sec CODE SIGNING: cs_invalid_page(0x1012cd000): p=4617[Finder] final status 0x3000a00, denying page sending SIGKILL
-7 sec CODE SIGNING: process 4617[Finder]: rejecting invalid page at address 0x1012cd000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
--> __TEXT 000000010c966000-000000010ce55000 [ 5052K] r-x/rwx SM=COW /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
__DATA 000000010ce55000-000000010cf53000 [ 1016K] rw-/rwx SM=COW /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
0 com.apple.finder 0x000000010c9a521f 0x10c966000 + 258591
10 com.apple.finder 0x000000010c9977b5 0x10c966000 + 202677
11 com.apple.finder 0x000000010c988154 0x10c966000 + 139604
12 com.apple.finder 0x000000010c987e15 0x10c966000 + 138773
13 com.apple.finder 0x000000010c987d35 0x10c966000 + 138549
14 com.apple.finder 0x000000010c987cfd 0x10c966000 + 138493
28 com.apple.finder 0x000000010c96b960 0x10c966000 + 22880
1 com.apple.finder 0x000000010c98a69d 0x10c966000 + 149149
2 com.apple.finder 0x000000010c98aba7 0x10c966000 + 150439
3 com.apple.finder 0x000000010c9795d2 0x10c966000 + 79314
4 com.apple.finder 0x000000010c98aa0b 0x10c966000 + 150027
5 com.apple.finder 0x000000010c98a952 0x10c966000 + 149842
6 com.apple.finder 0x000000010c98a78a 0x10c966000 + 149386
7 com.apple.finder 0x000000010c979496 0x10c966000 + 78998
8 com.apple.finder 0x000000010c98a548 0x10c966000 + 148808
9 com.apple.finder 0x000000010c98a410 0x10c966000 + 148496
10 com.apple.finder 0x000000010c983df6 0x10c966000 + 122358
0x10c966000 - 0x10ce54ffb com.apple.finder (10.10.1 - 10.10.1) <33C3024A-4A16-3485-B2B1-89FA33B9558A> /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
Many thanks
David -
I am getting error in transection created by crmd_order when status close ?
Hi Expert,
When i am creating transaction by tcode CRMD_ORDER in crm system ,I am getting warning "edit service ticket 800002568" when the status is close and was not able to see the system log.whenever i am cicking on log its show the warnoing and then control comes out from the transaction.I want to know the possible cause of this.Please anyone guide me to solve this.
Thanks,
Prem.Hi Laxmi,
As you said ,i am debugging all the modules ,i saw one thing for status close that we are getting a exception initially in class cl_gui_toolbar the error is Exception (cx_salv_bs_sc_runtime_info) occurred
this we are not getting for ticket status open ,inprocess.
why it coming is the problem ?
Maybe you are looking for
-
Problem with update for Windows 7 64 bit
I downloaded and updated to the newest version of iTunes, but when I restarted, as requested, my internet wouldn't work anymore. Not just when iTunes was open mind you....it wouldn't work AT ALL!! Up until the update iTunes ran fine, the internet was
-
Mac mini 2010, can't install bootcamp drivers
My brother's computer (mid 2010 Macmini) has previously been partioned with a Windows 7 32 bit system. Under bootcamp 4 we could install Windows 7 32 bit system, plus drivers and it was used for playing games on Steam. The partition was removed so it
-
How do I printmy Presenter Notes from Key Note?
-
Activation of History Log for Material Classification CLASS TYPE 001
Hi All. I've a question about this object. We need to launch RCCLUKA2 to activate multiple objects registration and to generate history log for changes in classification of materials (AUSP table). Reference are sap notes 942691 and 943559. I FOUND OU
-
Automatic batch determination - access sequence and search procedure
Hello all, I would like to know how will the system automatically start a batch determination for TOs in warehouse. pl. post any documents related to it. I would like to know how to activate automatic batch determination in the system for transfer or