Es un proceso un poco raro. Aquí aporto una rutina.
Más detalles en:
Código:
* _ _ _ __ _ * __| | ___ __| |_ _ ___ ___ (_)/ / (_)_ ____ _ * / _` |/ _ \/ _` | | | |/ __| _ \ / / | | \ / / _` | *| (_| | __/ (_| | |_| | (__ __/ / /_ | |\ V / (_| | * \__,_|\___|\__,_|\__,_|\___|___| /_/(_) |_| \_/ \__,_| * as seen on http://glob.cranf.net * ASCII art made at http://ascii.cranf.net * FORM deduce_porcentaje_iva USING pland1 pmwskz CHANGING pkbetr LIKE konp-kbetr. DATA lvakey LIKE konh-vakey. DATA lknumh LIKE konh-knumh. CLEAR pkbetr. CONCATENATE pland1 pmwskz INTO lvakey SEPARATED BY space. SELECT SINGLE knumh INTO lknumh FROM konh WHERE vakey = lvakey. IF sy-subrc = 0. SELECT SINGLE kbetr INTO pkbetr FROM konp WHERE knumh = lknumh. IF sy-subrc = 0. pkbetr = pkbetr / 10. ELSE. sy-subrc = 2. ENDIF. ELSE. sy-subrc = 1. ENDIF. ENDFORM.
Comentario