Skip to content

Commit

Permalink
add packed
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp committed Sep 11, 2022
1 parent 8ed30ab commit 3f6ab35
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/runtime/src/statements/create_data.ts
@@ -1,5 +1,5 @@
import {clone} from "../clone";
import {ABAPObject, Character, DataReference, Date, String, FieldSymbol, Float, Integer, Structure, Table, Time, XString, Hex} from "../types";
import {ABAPObject, Character, DataReference, Date, String, FieldSymbol, Float, Integer, Structure, Table, Time, XString, Hex, Packed} from "../types";
import {ICharacter} from "../types/_character";
import {INumeric} from "../types/_numeric";

Expand Down Expand Up @@ -62,6 +62,15 @@ export function createData(target: DataReference, options?: ICreateDataOptions)
target.assign(new Hex({length: length}));
}
break;
case "P":
{
let length = 1;
if (options.length) {
length = options.length.get();
}
target.assign(new Packed({length: length}));
}
break;
case "F":
target.assign(new Float());
break;
Expand Down

0 comments on commit 3f6ab35

Please sign in to comment.