Tuesday, January 10, 2017

Changing Profit Center from *** to *** Not Permitted - FAGL_ORG_UNITS Msg 011

Changing profit center from *** to *** not permitted.

Go to transaction OBA5.
Enter the relevant application area - in my case it "FAGL_ORG_UNITS".
Select the message 011 and change the value from "E" to "W" in all 3 cases.
Save it.
Problem will solved.


After the execution of the transaction, revert the settings.

Tuesday, September 27, 2016

Consolidated companies "----" and "-----" are different

When this error "Consolidated companies "----" and "-----" are different" is occurred, there are two ways to solve the issue.
1 - Check the document type. If the document type does not allow the inter company transaction the this error will be initiated. You can check by OBA7.
2- If the document type used is correct, then there might be transaction which is related to do trading partner. Check your configuration and also the transaction closely.

Thursday, July 21, 2016

BDC for MB1A - Post Goods Issue

Make the file txt file.
Format in the form of structure defined below in ST.

REPORT ZMB1A NO STANDARD PAGE HEADING LINE-SIZE 255.

"DECLARATION TYPES
DATA: W_FILENAME TYPE STRING.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-500.
PARAMETERS: P_FILENM LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.

"STRUCTURE
TYPES : BEGIN OF ST,
      BLDAT(10),
      BUDAT(10),
      BWARTWA(3),
      WERKS(4),
      LGORT(4),
      MATNR(18),
      ERFMG(13),
      KONTO(10),
      SGTXT(50),
      KOSTL(10),
  END OF ST.

*INTERNAL TABLE AND WORKAREA DECLARATION*
DATA : IT TYPE TABLE OF ST.
DATA : WA TYPE ST.

INCLUDE BDCRECX1.

START-OF-SELECTION.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILENM.

  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            MASK             = ',*.*,*.*.'
            MODE             = '0'
            TITLE            = 'GET FILE NAME'
       IMPORTING
            FILENAME         = P_FILENM
       EXCEPTIONS
            INV_WINSYS       = 1
            NO_BATCH         = 2
            SELECTION_CANCEL = 3
            SELECTION_ERROR  = 4
            OTHERS           = 5.

** START OF CHANGE DCS05052003
START-OF-SELECTION.
 W_FILENAME = P_FILENM.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
**   FILENAME                    = 'C:\BDC_XLS_ASSIGN.TXT'
   FILENAME                      = W_FILENAME
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
  TABLES
    DATA_TAB                     = IT
 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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO.
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

PERFORM OPEN_GROUP.

LOOP AT IT INTO WA.

PERFORM BDC_DYNPRO      USING 'SAPMM07M' '0400'.
PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                              'RM07M-BWARTWA'.
PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                              '=NPE'.
PERFORM BDC_FIELD       USING 'MKPF-BLDAT'
                              WA-BLDAT."'01.04.2016'.
PERFORM BDC_FIELD       USING 'MKPF-BUDAT'
                              WA-BUDAT."'20.07.2016'.
PERFORM BDC_FIELD       USING 'RM07M-BWARTWA'
                              WA-BWARTWA."'201'.
PERFORM BDC_FIELD       USING 'RM07M-WERKS'
                              WA-WERKS."'2000'.
PERFORM BDC_FIELD       USING 'RM07M-LGORT'
                              WA-LGORT."'2009'.
PERFORM BDC_FIELD       USING 'XFULL'
                              'X'.
PERFORM BDC_FIELD       USING 'RM07M-WVERS2'
                              'X'.
PERFORM BDC_DYNPRO      USING 'SAPMM07M' '0410'.
PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                              'MSEG-SGTXT'.
PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                              '=BU'.
PERFORM BDC_FIELD       USING 'MSEG-MATNR'
                              WA-MATNR."'300000011'.
PERFORM BDC_FIELD       USING 'MSEG-ERFMG'
                              WA-ERFMG."'250'.
PERFORM BDC_FIELD       USING 'MSEG-WERKS'
                              WA-WERKS."'2000'.
PERFORM BDC_FIELD       USING 'MSEG-LGORT'
                              WA-LGORT."'2009'.
PERFORM BDC_FIELD       USING 'DM07M-KONTO'
                              WA-KONTO."'650999'.
PERFORM BDC_FIELD       USING 'MSEG-SGTXT'
                              WA-SGTXT."'TEST'.
PERFORM BDC_FIELD       USING 'DKACB-FMORE'
                              'X'.
PERFORM BDC_DYNPRO      USING 'SAPLKACB' '0002'.
PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                              'COBL-AUFNR'.
PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                              '=ENTE'.
PERFORM BDC_FIELD       USING 'COBL-KOSTL'
                              WA-KOSTL."'20000'.
PERFORM BDC_TRANSACTION USING 'MB1A'.

ENDLOOP.

PERFORM CLOSE_GROUP.

Monday, July 4, 2016

Change Length of G/L account number

If you want to change the lenght of GL Account Number then

T-Code OB13,
Enter your chart of account.
Enter new entries or edit the already defined.

Friday, March 18, 2016

Version '0' is not defined for Fiscal Year XXXX

When you get the error "Version '0' is not defined for Fiscal Year XXXX".
Execute the T-Code OKEV.
Enter your Controlling Area.
Select Version 0.
Double click on "Setting for Each Fiscal Year".
Create a new entry for the fiscal year XXXX i.e. for which you are getting the error.

Friday, March 11, 2016

User exit to display Vendor Name in F110 - Payment Run in FI

When Automatic Payment Program is run (T.Code F110), the Text fields in Vendor Line should have "Payment" written and G/L Line should display the Vendor Name.

In Tcode - OBBH
Make a substitution rule with prerequisite - 
Transaction code F110 (BKPF-TCODE = F110)

Subsitiution - Exit on BSEG-SGTXT and call U903.

Go to program RGGBS000 and modify it.

Add the following code to the form get_exit_titles

EXITS-NAME = 'U903'.
EXITS-PARAM = C_EXIT_PARAM_NONE.
EXITS-TITLE = 'Vendor and G/L Line'.
APPEND EXITS.
 

and

Create a form below-

FORM U903.

DATA: L_NAME TYPE LFA1-NAME1.
DATA: V_LIFNR TYPE LFA1-LIFNR.
DATA: V_BELNR TYPE BKPF-BELNR.

IF BSEG-KOART EQ 'K'.
  BSEG-SGTXT = 'PAYMENT'.
  V_LIFNR = BSEG-LIFNR.
  EXPORT V_LIFNR TO MEMORY ID 'LIFNR'.
ENDIF.

IF BSEG-KOART EQ 'S'.
  IMPORT V_LIFNR FROM MEMORY ID 'LIFNR'.
  SELECT SINGLE NAME1 INTO L_NAME FROM LFA1 WHERE
    LIFNR = V_LIFNR.
  IF SY-SUBRC = 0.
    MOVE L_NAME TO BSEG-SGTXT.
  ENDIF.
  FREE MEMORY ID 'LIFNR'.
ENDIF.

ENDFORM.                                "U903
 

Thursday, March 3, 2016

Message no. M8394 "Perform the planned price change for material"



When you get the below mentioned error while processing MIRO transaction.
Kindly check that standard cost is released for the material for the current period.
If not the create the standard cost document and release the cost.

Tcode - CK11
and
Tcode - CK24