You are on page 1of 12

Sales and Distribution - Upload Condition Pricing

RV14BTCI - Batch Input for Uploading Condition Pricing After executing the program, you have to use SM35 to process the update program. Envirionment : 4.6x Require flat file :ROW 1 BGR00 ROW 2 BKOND1 ROW 3 BKOND2 - no scale ROW 4 BKOND2 - no scale ROW 5 BKOND3 - with scale ROW 6 BKOND2 - no scale Sample flat file for uploading table A305 - Customer/Material with release status :0BIPRICE 123SAPABAP X 1VK15 A305V PR00 2ALL 990000123456SAP8204142100 2002043020020401 50USD 100PC 2ALL 990000123456SAP8217168100 2002043020020401 50USD 100PC 3 100PC 2 3 200PC 1 2ALL 990000123456SAP8220133910
There a total of 4 flat file format :BGR00 - Session Header Record

----------------------------------------------------------------------------------------| Field name | Description | Length | Dec. | | Report header | Cat.

----------------------------------------------------------------------------------------| STYPE | Record type | 000001 | 000000 | | GROUP | Group name | 000012 | 000000 | | MANDT | Client | 000003 | 000000 | | USNAM | User ID | 000012 | 000000 | | 0 | BI Session Name | Your client no | Queue user ID | CHAR | CHAR | CLNT | CHAR

| START | Lock until: | 000010 | 000000 | | XKEEP | Keep indicator | 000001 | 000000 | | NODATA | No batch input | 000001 | 000000 |

| Queue start date

| DATS

| X - don't delete SESS| CHAR | / | CHAR

-----------------------------------------------------------------------------------------

BKOND1 - Header Record

----------------------------------------------------------------------------------------| Field name | Description | Length | Dec. | | Report header | Cat.

----------------------------------------------------------------------------------------| STYPE | Record type | 000001 | 000000 | | TCODE | Transaction code | 000020 | 000000 | | KVEWE | Usage | 000001 | 000000 | | KOTABNR | Table | 000003 | 000000 | | KAPPL | Application | 000002 | 000000 | | KSCHL | Condition type | 000004 | 000000 | | 1 | TCode = VK15 | U | Table e.g. 305 | App e.g V | CHAR | CHAR | CHAR | CHAR | CHAR | CHAR

| CTyp e.g PR00

-----------------------------------------------------------------------------------------

BKOND2 - Main Data Record

-----------------------------------------------------------------------------------------

| Field name | Description | Length | Dec. |

| Report header

| Cat.

----------------------------------------------------------------------------------------| STYPE | Record type | 000001 | 000000 | | VAKEY | VarKey | 000100 | 000000 | | DATBI | Valid to | 000010 | 000000 | | DATAB | Valid on | 000010 | 000000 | | KBETR | Amount | 000015 | 000000 | | KONWA | R/2 table | 000005 | 000000 | | KPEIN | R/2 table | 000005 | 000000 | | KMEIN | | 000003 | 000000 | | MWSK1 | Tax code | 000002 | 000000 | | KONMS | Scale UoM | 000003 | 000000 | | MXWRT | Amount | 000015 | 000000 | | GKWRT | Amount | 000015 | 000000 | | STFKZ | Scale type | 000001 | 000000 | | KZNEP | Exclusion | 000001 | 000000 | | LOEVM_KO | Deletion indic. | 000001 | 000000 | | SKONWA | R/2 table | 000005 | 000000 | | 2 | VarKey | Valid to | Valid on | Amount | R2tab | R2tab | | Tx | UoM | Amount | Amount | S | CndEx | D | R2tab | CHAR | CHAR | DATS | DATS | CHAR | CHAR | CHAR | CHAR | CHAR | UNIT | CHAR | CHAR | CHAR | CHAR | CHAR | CHAR

-----------------------------------------------------------------------------------------

BKOND3 - Scale Data Record

----------------------------------------------------------------------------------------| Field name | Description | Length | Dec. | | Report header | Cat.

----------------------------------------------------------------------------------------| STYPE | Record type | 000001 | 000000 | | KSTBM | Quantity | 000018 | 000000 | | KONMS | Scale UoM | 000003 | 000000 | | KBETR | Amount | 000015 | 000000 | | 3 | Quantity | UoM | Amount | CHAR | CHAR | UNIT | CHAR

Sales Order Changed History Display


* * Sales Order Changed History Display * * You can execute the report by : * 1. Change Date * 2. User Name * 3. Sales Order Number * * Submitted by : SAP Basis, ABAP Programming and Other IMG Stuff * http://www.sap-img.com * REPORT ZSDCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING LINE-COUNT 065(001) MESSAGE-ID VR. TABLES: DD04T, CDHDR, CDPOS, DD03L, DD41V, T685T, VBPA, TPART, KONVC,

VBUK. DATA: BEGIN OF ICDHDR OCCURS 50. INCLUDE STRUCTURE CDHDR. DATA: END OF ICDHDR. SELECT-OPTIONS: XUDATE FOR ICDHDR-UDATE, XNAME FOR ICDHDR-USERNAME, XVBELN FOR VBUK-VBELN. SELECTION-SCREEN SKIP. SELECTION-SCREEN BEGIN OF BLOCK BLK1 PARAMETERS: SUDATE RADIOBUTTON GROUP SNAME RADIOBUTTON GROUP SOBID RADIOBUTTON GROUP SELECTION-SCREEN END OF BLOCK BLK1. DATA: WFLAG, WCHANGENR LIKE CDHDR-CHANGENR, WUDATE LIKE CDHDR-UDATE, WNAME LIKE CDHDR-USERNAME, WVBELN LIKE VBUK-VBELN, WDEC1 TYPE P DECIMALS 3, WDEC2 TYPE P DECIMALS 3, WDEC3 TYPE P DECIMALS 3, WDEC4 TYPE P DECIMALS 3. DATA: UTEXT(16) VALUE 'has been changed', ITEXT(16) VALUE 'has been created', DTEXT(16) VALUE 'has been deleted'. DATA: BEGIN OF ICDSHW OCCURS 50. INCLUDE STRUCTURE CDSHW. DATA: END OF ICDSHW. DATA: BEGIN OF ITAB OCCURS 10. INCLUDE STRUCTURE CDSHW. DATA: UDATE LIKE CDHDR-UDATE, USERNAME LIKE CDHDR-USERNAME, CHANGENR LIKE CDHDR-CHANGENR, VBELN(10), POSNR(6), ETENR(4), INDTEXT(200), END OF ITAB. SELECT * FROM VBUK WHERE VBELN IN XVBELN. CLEAR CDHDR. CLEAR CDPOS. CDHDR-OBJECTCLAS = 'VERKBELEG'. CDHDR-OBJECTID = VBUK-VBELN. PERFORM READHEADER. PERFORM READPOS. LOOP AT ITAB. CASE ITAB-TABNAME. WHEN 'VBPA'. IF ITAB-FNAME = 'KUNNR' OR WITH FRAME TITLE TEXT-001. R1, R1, R1.

ITAB-FNAME = 'LIFNR' OR ITAB-FNAME = 'PARNR' OR ITAB-FNAME = 'PERNR' OR ITAB-FNAME IS INITIAL. MOVE ITAB-TABKEY TO VBPA. SELECT SINGLE * FROM TPART WHERE SPRAS = SY-LANGU AND PARVW = VBPA-PARVW. IF SY-SUBRC = 0. REPLACE '&' WITH TPART-VTEXT INTO ITAB-INDTEXT. ENDIF. ENDIF. WHEN 'VBAP'. IF ITAB-FNAME IS INITIAL. REPLACE '&' WITH 'Item' INTO ITAB-INDTEXT. ENDIF. WHEN 'KONVC'. MOVE ITAB-TABKEY TO KONVC. SELECT SINGLE * FROM T685T WHERE SPRAS = SY-LANGU AND KVEWE = 'A' AND KAPPL = 'V' AND KSCHL = KONVC-KSCHL. IF SY-SUBRC = 0. REPLACE '&' WITH T685T-VTEXT INTO ITAB-INDTEXT. ENDIF. ENDCASE. IF ITAB-INDTEXT(1) EQ '&'. REPLACE '&' WITH ITAB-FTEXT(40) INTO ITAB-INDTEXT. ENDIF. IF ITAB-CHNGIND = 'I'. REPLACE '%' WITH ITEXT INTO ITAB-INDTEXT. ELSEIF ITAB-CHNGIND = 'U'. REPLACE '%' WITH UTEXT INTO ITAB-INDTEXT. ELSE. REPLACE '%' WITH DTEXT INTO ITAB-INDTEXT. ENDIF. CONDENSE ITAB-INDTEXT. MODIFY ITAB. ENDLOOP. ENDSELECT. IF SUDATE = 'X'. SORT ITAB BY UDATE VBELN POSNR ETENR. ELSEIF SOBID = 'X'. SORT ITAB BY VBELN POSNR ETENR UDATE. ELSE. SORT ITAB BY USERNAME VBELN POSNR ETENR UDATE. ENDIF. LOOP AT ITAB. CLEAR WFLAG. IF SUDATE = 'X'. IF WUDATE NE ITAB-UDATE. SKIP. WRITE:/001 ITAB-UDATE, 023 ITAB-USERNAME, 037(10) ITAB-VBELN. WFLAG = 'X'.

WUDATE = ITAB-UDATE. WCHANGENR = ITAB-CHANGENR. ENDIF. ELSEIF SOBID NE 'X'. IF WVBELN NE ITAB-VBELN. SKIP. WRITE:/001 ITAB-VBELN. WVBELN = ITAB-VBELN. ENDIF. ELSE. IF WNAME NE ITAB-USERNAME. SKIP. WRITE:/001 ITAB-USERNAME. WNAME = ITAB-USERNAME. ENDIF. ENDIF. IF WCHANGENR NE ITAB-CHANGENR. WRITE:/023 ITAB-USERNAME, 037(10) ITAB-VBELN. WFLAG = 'X'. WCHANGENR = ITAB-CHANGENR. ENDIF. IF WFLAG = 'X'. WRITE: 013 ITAB-CHNGIND, 049 ITAB-POSNR, 057 ITAB-ETENR, 065 ITAB-INDTEXT(60). ELSE. WRITE: /013 ITAB-CHNGIND, 049 ITAB-POSNR, 057 ITAB-ETENR, 065 ITAB-INDTEXT(60). ENDIF. WRITE:/065 ITAB-F_OLD. WRITE:/065 ITAB-F_NEW. ENDLOOP. FORM READHEADER. CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS' EXPORTING DATE_OF_CHANGE = CDHDR-UDATE OBJECTCLASS = CDHDR-OBJECTCLAS OBJECTID = CDHDR-OBJECTID TIME_OF_CHANGE = CDHDR-UTIME USERNAME = CDHDR-USERNAME TABLES I_CDHDR = ICDHDR EXCEPTIONS NO_POSITION_FOUND = 1 OTHERS = 2. CASE SY-SUBRC. WHEN '0000'. WHEN '0001'. MESSAGE S311. LEAVE. WHEN '0002'.

MESSAGE S311. LEAVE. ENDCASE. ENDFORM. FORM READPOS. LOOP AT ICDHDR. CHECK ICDHDR-UDATE IN XUDATE. CHECK ICDHDR-USERNAME IN XNAME. CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS' EXPORTING CHANGENUMBER = ICDHDR-CHANGENR TABLEKEY = CDPOS-TABKEY TABLENAME = CDPOS-TABNAME IMPORTING HEADER = CDHDR TABLES EDITPOS = ICDSHW EXCEPTIONS NO_POSITION_FOUND = 1 OTHERS = 2. CASE SY-SUBRC. WHEN '0000'. LOOP AT ICDSHW. CHECK ICDSHW-CHNGIND NE 'E'. CLEAR ITAB. MOVE-CORRESPONDING ICDHDR TO ITAB. MOVE-CORRESPONDING ICDSHW TO ITAB. CASE ITAB-TABNAME. WHEN 'KONVC'. MOVE ICDHDR-OBJECTID TO ITAB-VBELN. MOVE ICDSHW-TABKEY(6) TO ITAB-POSNR. WHEN OTHERS. MOVE ICDSHW-TABKEY+3(10) TO ITAB-VBELN. MOVE ICDSHW-TABKEY+13(6) TO ITAB-POSNR. MOVE ICDSHW-TABKEY+19(4) TO ITAB-ETENR. ENDCASE. MOVE '& %' TO ITAB-INDTEXT. APPEND ITAB. CLEAR ITAB. ENDLOOP. WHEN OTHERS. MESSAGE S311. LEAVE. ENDCASE. ENDLOOP. ENDFORM. TOP-OF-PAGE. WRITE:/ SY-DATUM,SY-UZEIT, 50 'SALES ORDER CHANGE HISTORY', 120 'Page', SY-PAGNO. WRITE: / SY-REPID, 60 'SALES ORDERS STATISTICS'.

SKIP. ULINE. IF SUDATE = 'X'. WRITE:/001 'Change Date', 013 'Time', 023 'User Name', 037 'Sale Order', 049 'Line', 057 'Sch No', 065 'Changes'. ELSEIF SOBID = 'X'. WRITE:/001 'Sale Order', 013 'Line', 021 'Sch No', 029 'Change Date', 041 'Time', 051 'User Name', 065 'Comment'. ELSE. WRITE:/001 'User Name', 015 'Time', 025 'Change Date', 037 'Sale Order', 049 'Line', 057 'Sch No', 065 'Changes'. ENDIF. ULINE.

*--- End of Program Where to find the User Exits on Sales and Distribution along with functionality? To see the detail go to SPRO --- Sales and Distribution ---- System Modifications --- User Exits There you will find all the details by checking IMG Activity Documentation. You will have User exit for - Sales Document Processing. This IMG step describes additional installation-specific processing in sales document processing. In particular, the required INCLUDES and user exits are described. Involved program components System modifications for sales document processing affect different areas. Depending on the modification, you make the changes in the program components provided: - MV45ATZZ For entering metadata for sales document processing. User-specific metadata must start with "ZZ". - MV45AOZZ

For entering additional installation-specific modules for sales document processing which are called up by the screen and run under PBO (Process Before Output) prior to output of the screen. The modules must start with "ZZ". - MV45AIZZ To find User Exits in SAP please follow the steps given below. 1) Run Transaction SE81 2) Select SD 3) From the Menu Click on Edit 4) Select the option Select Subtreee +/- 5) From the Menu bar click on Information system 6) From the R/3 Repository information System open the Envir option 7) Select Exit Techniques 8) Select Customer Exits 9) Double click on Enhancements 10) Press F8 See the screen shots given below. Run Transaction SE81.

Select SD and then from the Edit menu click on Select Subtree

Click on Information System or press Shift+F4

Menu for 'R/3 Repository Information Sys' opens up

Follow the menu path Envir-----> Exit Techniques----> Customer Exits----> Enhancements

Click on the Execute button or press 'F8'

The following list is displayed.

Follow the above mentioned steps to find user exits for other modules.

Posted by ABAP FRIEND at 1:56 AM Labels: ABAP user exits, Finding Userexits in SAP, Locating user exits in SAP, SAP SD User Exits, User Exits, User Exits in SAP

1 comments:

Anonymous said... Nice one! I did use transaction SMOD which by pressing Ctrl-F (Search) brings you to the Search Enhancements screen. The point of your post is that you can let the system fill in selection Development Class. Great! :-)

Post a Comment

Links to this post Create a Link Newer Post Older Post Home Subscribe to: Post Comments (Atom) ABAP TIPS
PREVIOUS NEXT RANDOM Always specify your conditions in the Where-clause instead of checking them yourself with check statements. The database system can then use an index (if possible) and the network load is considerably less.