- SAP Community
- Products and Technology
- Supply Chain Management
- SCM Q&A
- UCC-128 SSCC Check Digit Calculation- SAP FM

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

UCC-128 SSCC Check Digit Calculation- SAP FM

former_member193460

Contributor

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

on 09-16-2016 1:29 AM

Hi,

Is there any standard function module in SAP EWM system to calculate check digit for SSCC (EAN 128). i am aware of the logic behind the calculation but why to re-invent the wheel if it exist already.

The logic to calculate:

(00)00872150999000002

Disregard the application identifier:

(00)

The UCC SSCC barcode uses a function code 1. Therefore, 1 is the first digit in the string to evaluate.

Therefore, the string to evaluate is:

100872150999000002

- Starting from position 2 of the number, add up the values in even numbered positions.

0 + 8 + 2 + 5 + 9 + 9 + 0 + 0 + 2 = 35 - Multiply the result of step 1 by 3.

35 x 3 = 105 - Starting from position 3 of the number, add up the values of the digits in odd-numbered positions:

0 + 7 + 1 + 0 + 9 + 0 + 0 + 0 = 17 - Add up the results of steps 2 and 3.

105 + 17 = 122 - The check character is the smallest number that when added to the result obtained in Step 4 gives a number that is a multiple of 10.

122 + x = 130 (multiple of 10)

Eight is the number that when added to 122 results in a multiple of 10. Therefore, the check character is**8**.

Let me know if anyone is aware of standard FM to do the task for me

- SAP Managed Tags:
- SAP Extended Warehouse Management

former_member193460

Contributor

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

09-19-2016
7:29 PM

i wrote an FM for this as i couldnot find any standard FMs.

DATA: length TYPE i.

DATA: lv_temp TYPE n,

lv_sum_first TYPE int4,

lv_sum_second TYPE int4,

lv_final_res TYPE int4.

DATA: work_string(50) TYPE c.

DATA: lv_first TYPE int4 VALUE 1,

lv_second TYPE int4 VALUE 2.

work_string = iv_number.

length = strlen( work_string ).

SHIFT work_string LEFT DELETING LEADING space.

DO length TIMES.

WRITE work_string+lv_first(1) TO lv_temp.

lv_sum_first = lv_sum_first + lv_temp.

WRITE work_string+lv_second(1) TO lv_temp.

lv_sum_second = lv_sum_second + lv_temp.

lv_first = lv_first + 2.

lv_second = lv_second + 2.

ENDDO.

lv_final_res = ( lv_sum_first * 3 ) + lv_sum_second.

*Logic to calculate the smallest number to add the the final result

*which is a multiple of 10

lv_final_res = 10 - ( lv_final_res MOD 10 ).

Ask a Question

Top Q&A Solution Author

User | Count |
---|---|

6 | |

2 | |

1 | |

1 | |

1 | |

1 | |

1 | |

1 | |

1 | |

1 |

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.